diff --git a/core/modules/update/update.manager.inc b/core/modules/update/update.manager.inc index a257685e86a68b6c7b38a63ace0d51f1e5edb9d0..19c0dc19abb940502aebd1bce269554cb1b8db27 100644 --- a/core/modules/update/update.manager.inc +++ b/core/modules/update/update.manager.inc @@ -82,7 +82,7 @@ function update_manager_update_form($form, $form_state = array(), $context) { return $form; } - $form['#attached']['css'][] = drupal_get_path('module', 'update') . '/css/update.admin.css'; + $form['#attached']['library'][] = array('update', 'drupal.update.admin'); // This will be a nested array. The first key is the kind of project, which // can be either 'enabled', 'disabled', 'manual' (projects which require diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 4cf9c0dfa8e5f96caf8f392e9b2957d00d368ffb..af8143b11a3d042cf1bb8749f2b5a66a3a7c716a 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -144,6 +144,23 @@ function update_page_build() { } } +/** + * Implements hook_library_info(). + */ +function update_library_info() { + $path = drupal_get_path('module', 'update'); + $libraries['drupal.update.admin'] = array( + 'title' => 'Update administration UI', + 'website' => '', + 'version' => \Drupal::VERSION, + 'css' => array( + $path . '/css/update.admin.css' => array(), + ), + ); + + return $libraries; +} + /** * Implements hook_menu(). */ diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index 039a506b211c4ef4d821b22f797f658e8151feac..51da7dd18158d7c1fb6a108f3863978d32bd4279 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -293,7 +293,16 @@ function theme_update_report($variables) { $output .= drupal_render($table); } } - drupal_add_css(drupal_get_path('module', 'update') . '/css/update.admin.css'); + + $assets = array( + '#attached' => array( + 'library' => array( + array('update', 'drupal.update.admin'), + ), + ) + ); + drupal_render($assets); + return $output; }