diff options
author | Dries Buytaert <dries@buytaert.net> | 2009-09-05 15:05:05 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2009-09-05 15:05:05 +0000 |
commit | a539b0e00dedddfea36d4a96b788e42923056a78 (patch) | |
tree | fcf4876cbfa5abef45c40e134b99bc30944fde14 /modules/node | |
parent | 2431df84a2a6afb07a5214ef748cded72ac87947 (diff) | |
download | brdo-a539b0e00dedddfea36d4a96b788e42923056a78.tar.gz brdo-a539b0e00dedddfea36d4a96b788e42923056a78.tar.bz2 |
- Patch by #565496 by dropcube, pwolanin: changed Allow dynamic attaching of other types of stuff to render() structures.
Diffstat (limited to 'modules/node')
-rw-r--r-- | modules/node/content_types.inc | 4 | ||||
-rw-r--r-- | modules/node/node.pages.inc | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/modules/node/content_types.inc b/modules/node/content_types.inc index c6e9d6da2..223609041 100644 --- a/modules/node/content_types.inc +++ b/modules/node/content_types.inc @@ -101,7 +101,9 @@ function node_type_form(&$form_state, $type = NULL) { '#maxlength' => 32, '#required' => TRUE, '#description' => t('The machine-readable name of this content type. This text will be used for constructing the URL of the <em>add new content</em> page for this content type. This name must contain only lowercase letters, numbers, and underscores. Underscores will be converted into hyphens when constructing the URL of the <em>add new content</em> page. This name must be unique.'), - '#attached_js' => array(drupal_get_path('module', 'system') . '/system.js', $js_settings), + '#attached' => array( + 'js' => array(drupal_get_path('module', 'system') . '/system.js', $js_settings), + ), ); } else { diff --git a/modules/node/node.pages.inc b/modules/node/node.pages.inc index af5f2ffd5..60168012b 100644 --- a/modules/node/node.pages.inc +++ b/modules/node/node.pages.inc @@ -172,7 +172,9 @@ function node_form(&$form_state, $node) { // Collapsed by default when "Create new revision" is unchecked '#collapsed' => !$node->revision, '#group' => 'additional_settings', - '#attached_js' => array(drupal_get_path('module', 'node') . '/node.js'), + '#attached' => array( + 'js' => array(drupal_get_path('module', 'node') . '/node.js'), + ), '#weight' => 20, ); $form['revision_information']['revision'] = array( @@ -198,7 +200,9 @@ function node_form(&$form_state, $node) { '#collapsible' => TRUE, '#collapsed' => TRUE, '#group' => 'additional_settings', - '#attached_js' => array(drupal_get_path('module', 'node') . '/node.js'), + '#attached' => array( + 'js' => array(drupal_get_path('module', 'node') . '/node.js'), + ), '#weight' => 90, ); $form['author']['name'] = array( @@ -229,7 +233,9 @@ function node_form(&$form_state, $node) { '#collapsible' => TRUE, '#collapsed' => TRUE, '#group' => 'additional_settings', - '#attached_js' => array(drupal_get_path('module', 'node') . '/node.js'), + '#attached' => array( + 'js' => array(drupal_get_path('module', 'node') . '/node.js'), + ), '#weight' => 95, ); $form['options']['status'] = array( |