diff options
Diffstat (limited to 'modules/file')
-rw-r--r-- | modules/file/file.field.inc | 8 | ||||
-rw-r--r-- | modules/file/file.module | 6 |
2 files changed, 6 insertions, 8 deletions
diff --git a/modules/file/file.field.inc b/modules/file/file.field.inc index 48a924784..12c1b600e 100644 --- a/modules/file/file.field.inc +++ b/modules/file/file.field.inc @@ -71,9 +71,7 @@ function file_field_settings_form($field, $instance) { $defaults = field_info_field_settings($field['type']); $settings = array_merge($defaults, $field['settings']); - $form = array( - '#attached_js' => array(drupal_get_path('module', 'file') . '/file.js'), - ); + $form['#attached']['js'][] = drupal_get_path('module', 'file') . '/file.js'; $form['display_field'] = array( '#type' => 'checkbox', @@ -119,9 +117,7 @@ function file_field_settings_form($field, $instance) { function file_field_instance_settings_form($field, $instance) { $settings = $instance['settings']; - $form = array( - '#attached_js' => array(drupal_get_path('module', 'file') . '/file.js'), - ); + $form['#attached']['js'][] = drupal_get_path('module', 'file') . '/file.js'; $form['max_filesize'] = array( '#type' => 'textfield', diff --git a/modules/file/file.module b/modules/file/file.module index 21b147889..4af5bae07 100644 --- a/modules/file/file.module +++ b/modules/file/file.module @@ -50,8 +50,10 @@ function file_elements() { '#upload_validators' => array(), '#upload_location' => NULL, '#extended' => FALSE, - '#attached_css' => array($file_path . '/file.css'), - '#attached_js' => array($file_path . '/file.js'), + '#attached' => array( + 'css' => array($file_path . '/file.css'), + 'js' => array($file_path . '/file.js'), + ), ); return $elements; |