Commit a68a2e23 authored by webchick's avatar webchick

Issue #2095311 by Wim Leers: Remove drupal_add_css() from update.module.

parent 41623883
...@@ -82,7 +82,7 @@ function update_manager_update_form($form, $form_state = array(), $context) { ...@@ -82,7 +82,7 @@ function update_manager_update_form($form, $form_state = array(), $context) {
return $form; 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 // This will be a nested array. The first key is the kind of project, which
// can be either 'enabled', 'disabled', 'manual' (projects which require // can be either 'enabled', 'disabled', 'manual' (projects which require
......
...@@ -144,6 +144,23 @@ function update_page_build() { ...@@ -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(). * Implements hook_menu().
*/ */
......
...@@ -293,7 +293,16 @@ function theme_update_report($variables) { ...@@ -293,7 +293,16 @@ function theme_update_report($variables) {
$output .= drupal_render($table); $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; return $output;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment