diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index a8a8dd2..575c8f4 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -442,7 +442,7 @@ public function __construct(ViewStorageInterface $storage) { $this->storage->set('executable', $this); // Add the default css for a view. - $this->element['#attached']['css'][] = drupal_get_path('module', 'views') . '/css/views.base.css'; + $this->element['#attached']['library'][] = array('views', 'views.base'); } /** diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 09d8c6e..431f371 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -844,13 +844,20 @@ function views_hook_info() { * Implements hook_library_info(). */ function views_library_info() { - $path = drupal_get_path('module', 'views') . '/js'; + $path = drupal_get_path('module', 'views'); + $libraries['views.base'] = array( + 'title' => 'Views base', + 'version' => VERSION, + 'css' => array( + "$path/css/views.base.css" + ), + ); $libraries['views.ajax'] = array( 'title' => 'Views AJAX', 'version' => VERSION, 'js' => array( - "$path/base.js" => array('group' => JS_DEFAULT), - "$path/ajax_view.js" => array('group' => JS_DEFAULT), + "$path/js/base.js" => array('group' => JS_DEFAULT), + "$path/js/ajax_view.js" => array('group' => JS_DEFAULT), ), 'dependencies' => array( array('system', 'jquery'), @@ -865,13 +872,20 @@ function views_library_info() { 'title' => 'Views Contextual links', 'version' => VERSION, 'js' => array( - "$path/views-contextual.js" => array('group' => JS_LIBRARY, 'weight' => -10), + "$path/js/views-contextual.js" => array('group' => JS_LIBRARY, 'weight' => -10), ), 'dependencies' => array( array('system', 'jquery'), array('system', 'drupal'), ), ); + $libraries['views.exposed-form'] = array( + 'title' => 'Views exposed form', + 'version' => VERSION, + 'css' => array( + "$path/css/views.exposed_form.css" + ), + ); return $libraries; } diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index 29f8d19..bfa9dea 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -1054,7 +1054,7 @@ function template_preprocess_views_exposed_form(&$vars) { } // Include basic theming for exposed forms. - @$form['#attached']['css'][] = drupal_get_path('module', 'views') . '/css/views.exposed_form.css'; + $form['#attached']['library'][] = array('views', 'views.exposed-form'); foreach ($form['#info'] as $id => $info) { if (!empty($info['label'])) {