diff --git a/core/includes/common.inc b/core/includes/common.inc index 4668a90..0e3712b 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -4179,7 +4179,6 @@ function drupal_process_states(&$elements) { */ function drupal_add_library($module, $name, $every_page = NULL) { $added = &drupal_static(__FUNCTION__, array()); - // Only process the library if it exists and it was not added already. if (!isset($added[$module][$name])) { if ($library = drupal_get_library($module, $name)) { @@ -4216,13 +4215,11 @@ function drupal_add_library($module, $name, $every_page = NULL) { * @param $module * The name of a module that registered a library. * @param $name - * (optional) The name of a registered library to retrieve. By default, all - * libraries registered by $module are returned. + * The name of a registered library to retrieve. * * @return * The definition of the requested library, if $name was passed and it exists, - * or FALSE if it does not exist. If no $name was passed, an associative array - * of libraries registered by $module is returned (which may be empty). + * or FALSE if it does not exist. * * @see drupal_add_library() * @see hook_library_info() @@ -4231,43 +4228,41 @@ function drupal_add_library($module, $name, $every_page = NULL) { * @todo The purpose of drupal_get_*() is completely different to other page * requisite API functions; find and use a different name. */ -function drupal_get_library($module, $name = NULL) { +function drupal_get_library($module, $name) { $libraries = &drupal_static(__FUNCTION__, array()); - if (!isset($libraries[$module])) { - // Retrieve all libraries associated with the module. - $module_libraries = module_invoke($module, 'library_info'); - if (empty($module_libraries)) { - $module_libraries = array(); - } - // Allow modules to alter the module's registered libraries. - drupal_alter('library_info', $module_libraries, $module); - - foreach ($module_libraries as $key => $data) { - if (is_array($data)) { - // Add default elements to allow for easier processing. - $module_libraries[$key] += array('dependencies' => array(), 'js' => array(), 'css' => array()); - foreach ($module_libraries[$key]['js'] as $file => $options) { - if (is_scalar($options)) { - // The JavaScript or CSS file has been specified in shorthand - // format, without an array of options. In this case $options is the - // filename. - $file = $options; - $options = array(); + $library_name = $module . '/' . $name; + if (!isset($libraries[$library_name])) { + $module_path = drupal_get_path('module', $module); + $library_info = $module_path . '/' . $module . '.library.yml'; + if (file_exists($library_info)) { + $parser = new Parser(); + $infos = $parser->parse(file_get_contents($library_info)); + $infos = $infos[$name] + array('dependencies' => array(), 'js' => array(), 'css' => array()); + + foreach (array('js', 'css') as $type) { + foreach ($infos[$type] as &$file) { + $file['version'] = $infos['version']; + if (!is_array($file['data']) && strpos($file['data'], 'core') === FALSE) { + $file['data'] = $module_path . '/' . $file['data']; } - $module_libraries[$key]['js'][$file]['version'] = $module_libraries[$key]['version']; } } + + // @todo replace all uses of #attached and remove this. + foreach ($infos['dependencies'] as $i => $dep) { + $infos['dependencies'][$i] = explode('/', $dep); + } + + drupal_alter('library_info', $infos, $library_name); + + $libraries[$library_name] = $infos; } - $libraries[$module] = $module_libraries; - } - if (isset($name)) { - if (!isset($libraries[$module][$name])) { - $libraries[$module][$name] = FALSE; + else { + $libraries[$library_name] = FALSE; } - return $libraries[$module][$name]; } - return $libraries[$module]; + return $libraries[$library_name]; } /** diff --git a/core/modules/block/block.library.yml b/core/modules/block/block.library.yml new file mode 100644 index 0000000..20f10c1 --- /dev/null +++ b/core/modules/block/block.library.yml @@ -0,0 +1,8 @@ +drupal.block: + title: Block + version: 8.0-dev + js: + - { data: block.js } + dependencies: + - system/jquery + - system/drupal diff --git a/core/modules/block/block.module b/core/modules/block/block.module index d94ec3b..4441d60 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -626,22 +626,3 @@ function block_language_delete($language) { } } } - -/** - * Implements hook_library_info(). - */ -function block_library_info() { - $libraries['drupal.block'] = array( - 'title' => 'Block', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'block') . '/block.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - ), - ); - - return $libraries; -} diff --git a/core/modules/book/book.library.yml b/core/modules/book/book.library.yml new file mode 100644 index 0000000..1dd436a --- /dev/null +++ b/core/modules/book/book.library.yml @@ -0,0 +1,9 @@ +drupal.book: + title: Book + version: 8.0-dev + js: + - { data: book.js } + dependencies: + - system/jquery + - system/drupal + - system/drupal.form diff --git a/core/modules/book/book.module b/core/modules/book/book.module index 3ac47f4..6b3abc3 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -1338,23 +1338,3 @@ function book_menu_subtree_data($link) { return $tree[$cid]; } - -/** - * Implements hook_library_info(). - */ -function book_library_info() { - $libraries['drupal.book'] = array( - 'title' => 'Book', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'book') . '/book.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupal.form'), - ), - ); - - return $libraries; -} diff --git a/core/modules/ckeditor/ckeditor.library.yml b/core/modules/ckeditor/ckeditor.library.yml new file mode 100644 index 0000000..b4feddd --- /dev/null +++ b/core/modules/ckeditor/ckeditor.library.yml @@ -0,0 +1,41 @@ +drupal.ckeditor: + title: 'Drupal behavior to enable CKEditor on textareas.' + version: 8.0-dev + js: + 1: { data: js/ckeditor.js } + 2: { data: '0', type: setting } + dependencies: + - system/drupal + - ckeditor/ckeditor + - editor/drupal.editor +drupal.ckeditor.admin: + title: 'Drupal behavior for drag-and-drop CKEditor toolbar builder UI.' + version: 8.0-dev + js: + - { data: js/ckeditor.admin.js } + css: + - { data: css/ckeditor.admin.css } + - { data: core/misc/ckeditor/skins/moono/editor.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once + - system/jquery.ui.sortable + - system/jquery.ui.draggable + - system/jquery.ui.touch-punch +drupal.ckeditor.stylescombo.admin: + title: 'Only show the "stylescombo" plugin settings when its button is enabled.' + version: 8.0-dev + js: + - { data: js/ckeditor.stylescombo.admin.js } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once + - system/drupal.vertical-tabs +ckeditor: + title: 'Loads the main CKEditor library.' + version: '4.1' + js: + - { data: core/misc/ckeditor/ckeditor.js, preprocess: false } diff --git a/core/modules/ckeditor/ckeditor.module b/core/modules/ckeditor/ckeditor.module index c53fefa..74e3ab6 100644 --- a/core/modules/ckeditor/ckeditor.module +++ b/core/modules/ckeditor/ckeditor.module @@ -4,77 +4,6 @@ * @file * Provides integration with the CKEditor WYSIWYG editor. */ - -/** - * Implements hook_library_info(). - */ -function ckeditor_library_info() { - $module_path = drupal_get_path('module', 'ckeditor'); - - $settings = array( - 'ckeditor' => array( - 'modulePath' => drupal_get_path('module', 'ckeditor'), - ), - ); - $libraries['drupal.ckeditor'] = array( - 'title' => 'Drupal behavior to enable CKEditor on textareas.', - 'version' => VERSION, - 'js' => array( - $module_path . '/js/ckeditor.js' => array(), - array('data' => $settings, 'type' => 'setting'), - ), - 'dependencies' => array( - array('system', 'drupal'), - array('ckeditor', 'ckeditor'), - array('editor', 'drupal.editor'), - ), - ); - $libraries['drupal.ckeditor.admin'] = array( - 'title' => 'Drupal behavior for drag-and-drop CKEditor toolbar builder UI.', - 'version' => VERSION, - 'js' => array( - $module_path . '/js/ckeditor.admin.js' => array(), - ), - 'css' => array( - $module_path . '/css/ckeditor.admin.css' => array(), - 'core/misc/ckeditor/skins/moono/editor.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - array('system', 'jquery.ui.sortable'), - array('system', 'jquery.ui.draggable'), - array('system', 'jquery.ui.touch-punch'), - ), - ); - $libraries['drupal.ckeditor.stylescombo.admin'] = array( - 'title' => 'Only show the "stylescombo" plugin settings when its button is enabled.', - 'version' => VERSION, - 'js' => array( - $module_path . '/js/ckeditor.stylescombo.admin.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - array('system', 'drupal.vertical-tabs'), - ), - ); - $libraries['ckeditor'] = array( - 'title' => 'Loads the main CKEditor library.', - 'version' => '4.1', - 'js' => array( - 'core/misc/ckeditor/ckeditor.js' => array( - 'preprocess' => FALSE, - ), - ), - ); - - return $libraries; -} - /** * Implements hook_theme(). */ diff --git a/core/modules/color/color.library.yml b/core/modules/color/color.library.yml new file mode 100644 index 0000000..bbce64f --- /dev/null +++ b/core/modules/color/color.library.yml @@ -0,0 +1,21 @@ +drupal.color: + title: Color + version: 8.0-dev + js: + - { data: color.js } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once + - system/jquery.farbtastic + - color/drupal.color.preview +drupal.color.preview: + title: 'Color preview' + version: 8.0-dev + js: + - { data: preview.js } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once diff --git a/core/modules/color/color.module b/core/modules/color/color.module index 2203133..a5df7c2 100644 --- a/core/modules/color/color.module +++ b/core/modules/color/color.module @@ -756,38 +756,3 @@ function _color_rgb2hsl($rgb) { return array($h, $s, $l); } - -/** - * Implements hook_library_info(). - */ -function color_library_info() { - $libraries['drupal.color'] = array( - 'title' => 'Color', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'color') . '/color.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - array('system', 'jquery.farbtastic'), - array('color', 'drupal.color.preview'), - ), - ); - $libraries['drupal.color.preview'] = array( - 'title' => 'Color preview', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'color') . '/preview.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - ), - ); - - return $libraries; -} diff --git a/core/modules/comment/comment.library.yml b/core/modules/comment/comment.library.yml new file mode 100644 index 0000000..6f66396 --- /dev/null +++ b/core/modules/comment/comment.library.yml @@ -0,0 +1,9 @@ +drupal.comment: + title: Comment + version: 8.0-dev + js: + - { data: comment-node-form.js } + dependencies: + - system/jquery + - system/drupal + - system/drupal.form diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 717a25b..4af6401 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1998,23 +1998,3 @@ function comment_file_download_access($field, EntityInterface $entity, File $fil return FALSE; } } - -/** - * Implements hook_library_info(). - */ -function comment_library_info() { - $libraries['drupal.comment'] = array( - 'title' => 'Comment', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'comment') . '/comment-node-form.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupal.form'), - ), - ); - - return $libraries; -} diff --git a/core/modules/contextual/contextual.library.yml b/core/modules/contextual/contextual.library.yml new file mode 100644 index 0000000..f8210a2 --- /dev/null +++ b/core/modules/contextual/contextual.library.yml @@ -0,0 +1,30 @@ +drupal.contextual-links: + title: 'Contextual Links' + website: 'http://drupal.org/node/473268' + version: 8.0-dev + js: + - { data: contextual.js, group: -100, weight: -2 } + css: + - { data: contextual.base.css } + - { data: contextual.theme.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/backbone + - system/modernizr + - system/jquery.once +drupal.contextual-toolbar: + title: 'Contextual Links Toolbar Tab' + version: 8.0-dev + js: + - { data: contextual.toolbar.js, group: -100, weight: -1 } + css: + - { data: contextual.toolbar.css } + dependencies: + - system/jquery + - system/drupal + - system/backbone + - system/jquery.once + - system/drupal.tabbingmanager + - system/drupal.announce diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module index 51747c6..4de8018 100644 --- a/core/modules/contextual/contextual.module +++ b/core/modules/contextual/contextual.module @@ -71,57 +71,6 @@ function contextual_permission() { } /** - * Implements hook_library_info(). - */ -function contextual_library_info() { - $path = drupal_get_path('module', 'contextual'); - $libraries['drupal.contextual-links'] = array( - 'title' => 'Contextual Links', - 'website' => 'http://drupal.org/node/473268', - 'version' => VERSION, - 'js' => array( - // Add the JavaScript, with a group and weight such that it will run - // before modules/contextual/contextual.toolbar.js. - $path . '/contextual.js' => array('group' => JS_LIBRARY, 'weight' => -2), - ), - 'css' => array( - $path . '/contextual.base.css' => array(), - $path . '/contextual.theme.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'backbone'), - array('system', 'modernizr'), - array('system', 'jquery.once'), - ), - ); - $libraries['drupal.contextual-toolbar'] = array( - 'title' => 'Contextual Links Toolbar Tab', - 'version' => VERSION, - 'js' => array( - // Add the JavaScript, with a group and weight such that it will run - // before modules/overlay/overlay-parent.js. - $path . '/contextual.toolbar.js' => array('group' => JS_LIBRARY, 'weight' => -1), - ), - 'css' => array( - $path . '/contextual.toolbar.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'backbone'), - array('system', 'jquery.once'), - array('system', 'drupal.tabbingmanager'), - array('system', 'drupal.announce'), - ), - ); - - return $libraries; -} - -/** * Implements hook_element_info(). */ function contextual_element_info() { diff --git a/core/modules/edit/edit.library.yml b/core/modules/edit/edit.library.yml new file mode 100644 index 0000000..17a5940 --- /dev/null +++ b/core/modules/edit/edit.library.yml @@ -0,0 +1,41 @@ +edit: + title: 'Edit: in-place editing' + version: 8.0-dev + js: + - { data: js/edit.js, scope: footer } + - { data: js/models/AppModel.js, scope: footer } + - { data: js/models/EntityModel.js, scope: footer } + - { data: js/models/FieldModel.js, scope: footer } + - { data: js/models/EditorModel.js, scope: footer } + - { data: js/views/AppView.js, scope: footer } + - { data: js/views/EditorDecorationView.js, scope: footer } + - { data: js/views/ContextualLinkView.js, scope: footer } + - { data: js/views/ModalView.js, scope: footer } + - { data: js/views/FieldToolbarView.js, scope: footer } + - { data: js/views/EditorView.js, scope: footer } + - { data: js/util.js, scope: footer } + - { data: js/theme.js, scope: footer } + css: + - { data: css/edit.css } + dependencies: + - system/jquery + - system/underscore + - system/backbone + - system/jquery.form + - system/drupal.form + - system/drupal.ajax + - system/drupalSettings +edit.editorWidget.form: + title: 'Form in-place editor' + version: 8.0-dev + js: + - { data: js/editors/formEditor.js, scope: footer } + dependencies: + - edit/edit +edit.editorWidget.direct: + title: 'Direct in-place editor' + version: 8.0-dev + js: + - { data: js/editors/directEditor.js, scope: footer } + dependencies: + - edit/edit diff --git a/core/modules/edit/edit.module b/core/modules/edit/edit.module index 6a73d89..9e87308 100644 --- a/core/modules/edit/edit.module +++ b/core/modules/edit/edit.module @@ -61,73 +61,6 @@ function edit_page_build(&$page) { } /** - * Implements hook_library_info(). - */ -function edit_library_info() { - $path = drupal_get_path('module', 'edit'); - $options = array( - 'scope' => 'footer', - ); - $libraries['edit'] = array( - 'title' => 'Edit: in-place editing', - 'version' => VERSION, - 'js' => array( - // Core. - $path . '/js/edit.js' => $options, - // Models. - $path . '/js/models/AppModel.js' => $options, - $path . '/js/models/EntityModel.js' => $options, - $path . '/js/models/FieldModel.js' => $options, - $path . '/js/models/EditorModel.js' => $options, - // Views. - $path . '/js/views/AppView.js' => $options, - $path . '/js/views/EditorDecorationView.js' => $options, - $path . '/js/views/ContextualLinkView.js' => $options, - $path . '/js/views/ModalView.js' => $options, - $path . '/js/views/FieldToolbarView.js' => $options, - $path . '/js/views/EditorView.js' => $options, - // Other. - $path . '/js/util.js' => $options, - $path . '/js/theme.js' => $options, - ), - 'css' => array( - $path . '/css/edit.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'underscore'), - array('system', 'backbone'), - array('system', 'jquery.form'), - array('system', 'drupal.form'), - array('system', 'drupal.ajax'), - array('system', 'drupalSettings'), - ), - ); - $libraries['edit.editorWidget.form'] = array( - 'title' => 'Form in-place editor', - 'version' => VERSION, - 'js' => array( - $path . '/js/editors/formEditor.js' => $options, - ), - 'dependencies' => array( - array('edit', 'edit'), - ), - ); - $libraries['edit.editorWidget.direct'] = array( - 'title' => 'Direct in-place editor', - 'version' => VERSION, - 'js' => array( - $path . '/js/editors/directEditor.js' => $options, - ), - 'dependencies' => array( - array('edit', 'edit'), - ), - ); - - return $libraries; -} - -/** * Implements hook_preprocess_HOOK() for field.tpl.php. */ function edit_preprocess_field(&$variables) { diff --git a/core/modules/editor/editor.library.yml b/core/modules/editor/editor.library.yml new file mode 100644 index 0000000..fd04869 --- /dev/null +++ b/core/modules/editor/editor.library.yml @@ -0,0 +1,21 @@ +drupal.editor: + title: 'Text Editor' + version: 8.0-dev + js: + - { data: js/editor.js } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once +edit.formattedTextEditor.editor: + title: 'Formatted text editor' + version: 8.0-dev + js: + 1: { data: js/editor.formattedTextEditor.js, scope: footer, attributes: { defer: true } } + 2: { data: '0', type: setting } + dependencies: + - edit/edit + - editor/drupal.editor + - system/drupal.ajax + - system/drupalSettings diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index 0f317b9..1ca859c 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -61,53 +61,6 @@ function editor_element_info() { } /** - * Implements hook_library_info(). - */ -function editor_library_info() { - $path = drupal_get_path('module', 'editor'); - $libraries['drupal.editor'] = array( - 'title' => 'Text Editor', - 'version' => VERSION, - 'js' => array( - $path . '/js/editor.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - ), - ); - - $libraries['edit.formattedTextEditor.editor'] = array( - 'title' => 'Formatted text editor', - 'version' => VERSION, - 'js' => array( - $path . '/js/editor.formattedTextEditor.js' => array( - 'scope' => 'footer', - 'attributes' => array('defer' => TRUE), - ), - array( - 'type' => 'setting', - 'data' => array( - 'editor' => array( - 'getUntransformedTextURL' => url('editor/!entity_type/!id/!field_name/!langcode/!view_mode'), - ) - ) - ), - ), - 'dependencies' => array( - array('edit', 'edit'), - array('editor', 'drupal.editor'), - array('system', 'drupal.ajax'), - array('system', 'drupalSettings'), - ), - ); - - return $libraries; -} - -/** * Implements hook_custom_theme(). * * @todo Add an event subscriber to the Ajax system to automatically set the diff --git a/core/modules/field_ui/field_ui.library.yml b/core/modules/field_ui/field_ui.library.yml new file mode 100644 index 0000000..c339453 --- /dev/null +++ b/core/modules/field_ui/field_ui.library.yml @@ -0,0 +1,12 @@ +drupal.field_ui: + title: 'Field UI' + version: 8.0-dev + js: + - { data: field_ui.js } + css: + - { data: field_ui.admin.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module index cce8734..c5e1f2f 100644 --- a/core/modules/field_ui/field_ui.module +++ b/core/modules/field_ui/field_ui.module @@ -328,30 +328,6 @@ function field_ui_form_node_type_form_submit($form, &$form_state) { } /** - * Implements hook_library_info(). - */ -function field_ui_library_info() { - $libraries['drupal.field_ui'] = array( - 'title' => 'Field UI', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'field_ui') . '/field_ui.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'field_ui') . '/field_ui.admin.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - ), - ); - - return $libraries; -} - -/** * Implements hook_view_mode_presave(). */ function field_ui_view_mode_presave(EntityViewModeInterface $view_mode) { diff --git a/core/modules/file/file.library.yml b/core/modules/file/file.library.yml new file mode 100644 index 0000000..e9ce1ec --- /dev/null +++ b/core/modules/file/file.library.yml @@ -0,0 +1,11 @@ +drupal.file: + title: File + version: 8.0-dev + js: + - { data: file.js } + css: + 1: { data: file.admin.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings diff --git a/core/modules/file/file.module b/core/modules/file/file.module index 18dae26..b8b1ae9 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -1636,26 +1636,3 @@ function file_get_file_references(File $file, $field = NULL, $age = FIELD_LOAD_R /** * @} End of "defgroup file-module-api". */ - -/** - * Implements hook_library_info(). - */ -function file_library_info() { - $libraries['drupal.file'] = array( - 'title' => 'File', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'file') . '/file.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'file') . '/file.admin.css' - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - ), - ); - - return $libraries; -} diff --git a/core/modules/filter/filter.library.yml b/core/modules/filter/filter.library.yml new file mode 100644 index 0000000..d14cb86 --- /dev/null +++ b/core/modules/filter/filter.library.yml @@ -0,0 +1,23 @@ +drupal.filter.admin: + title: Filter + version: 8.0-dev + js: + - { data: filter.admin.js } + css: + 1: { data: filter.admin.css } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once + - system/drupal.form +drupal.filter: + title: Filter + version: 8.0-dev + js: + - { data: filter.js } + css: + 1: { data: filter.admin.css } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index 57ff8c2..1b69cfc 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -1799,42 +1799,3 @@ function _filter_html_image_secure_tips($filter, $format, $long = FALSE) { /** * @} End of "defgroup standard_filters". */ - -/** - * Implements hook_library_info(). - */ -function filter_library_info() { - $libraries['drupal.filter.admin'] = array( - 'title' => 'Filter', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'filter') . '/filter.admin.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'filter') . '/filter.admin.css' - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - array('system', 'drupal.form'), - ), - ); - $libraries['drupal.filter'] = array( - 'title' => 'Filter', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'filter') . '/filter.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'filter') . '/filter.admin.css' - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - ), - ); - - return $libraries; -} diff --git a/core/modules/locale/locale.library.yml b/core/modules/locale/locale.library.yml new file mode 100644 index 0000000..e3f4fee --- /dev/null +++ b/core/modules/locale/locale.library.yml @@ -0,0 +1,18 @@ +drupal.locale.admin: + title: Locale + version: 8.0-dev + js: + - { data: locale.admin.js } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once +drupal.locale.datepicker: + title: 'Locale Datepicker UI' + version: 8.0-dev + js: + - { data: locale.datepicker.js } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 75e0a22..2eede2a 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -654,50 +654,18 @@ function locale_js_alter(&$javascript) { } /** - * Implements hook_library_info(). - */ -function locale_library_info() { - $libraries['drupal.locale.admin'] = array( - 'title' => 'Locale', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'locale') . '/locale.admin.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - ), - ); - $libraries['drupal.locale.datepicker'] = array( - 'title' => 'Locale Datepicker UI', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'locale') . '/locale.datepicker.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - ), - ); - - return $libraries; -} - -/** * Implement hook_library_info_alter(). * * Provides the language support for the jQuery UI Date Picker. */ -function locale_library_info_alter(&$libraries, $module) { - if ($module == 'system' && isset($libraries['jquery.ui.datepicker'])) { +function locale_library_info_alter(&$libraries, $name) { + if ($name == 'system/jquery.ui.datepicker') { $language_interface = language(LANGUAGE_TYPE_INTERFACE); // locale.datepicker.js should be added in the JS_LIBRARY group, so that // this attach behavior will execute early. JS_LIBRARY is the default for // hook_library_info_alter(), thus does not have to be specified explicitly. - $libraries['jquery.ui.datepicker']['dependencies'][] = array('locale', 'drupal.locale.datepicker'); - $libraries['jquery.ui.datepicker']['js'][] = array( + $libraries['dependencies'][] = array('locale', 'drupal.locale.datepicker'); + $libraries['js'][] = array( 'data' => array( 'jquery' => array( 'ui' => array( diff --git a/core/modules/menu/menu.library.yml b/core/modules/menu/menu.library.yml new file mode 100644 index 0000000..a5633d1 --- /dev/null +++ b/core/modules/menu/menu.library.yml @@ -0,0 +1,17 @@ +drupal.menu: + title: Menu + version: 8.0-dev + js: + - { data: menu.js } + dependencies: + - system/jquery + - system/drupal + - system/drupal.form +drupal.menu.admin: + title: 'Menu admin' + version: 8.0-dev + js: + - { data: menu.admin.js } + dependencies: + - system/jquery + - system/drupal diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index 93c2ed8..ef0505e 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -721,33 +721,3 @@ function menu_preprocess_block(&$variables) { } } -/** - * Implements hook_library_info(). - */ -function menu_library_info() { - $libraries['drupal.menu'] = array( - 'title' => 'Menu', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'menu') . '/menu.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupal.form'), - ), - ); - $libraries['drupal.menu.admin'] = array( - 'title' => 'Menu admin', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'menu') . '/menu.admin.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - ), - ); - - return $libraries; -} diff --git a/core/modules/node/node.library.yml b/core/modules/node/node.library.yml new file mode 100644 index 0000000..c922435 --- /dev/null +++ b/core/modules/node/node.library.yml @@ -0,0 +1,27 @@ +drupal.node: + title: Node + version: 8.0-dev + js: + - { data: node.js } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/drupal.form +drupal.node.preview: + title: 'Node preview' + version: 8.0-dev + js: + - { data: node.preview.js } + dependencies: + - system/jquery + - system/drupal +drupal.content_types: + title: 'Content types' + version: 8.0-dev + js: + - { data: content_types.js } + dependencies: + - system/jquery + - system/drupal + - system/drupal.form diff --git a/core/modules/node/node.module b/core/modules/node/node.module index ae25bb1..544e276 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -3534,50 +3534,6 @@ function node_language_delete($language) { } /** - * Implements hook_library_info(). - */ -function node_library_info() { - $libraries['drupal.node'] = array( - 'title' => 'Node', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'node') . '/node.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'drupal.form'), - ), - ); - $libraries['drupal.node.preview'] = array( - 'title' => 'Node preview', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'node') . '/node.preview.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - ), - ); - $libraries['drupal.content_types'] = array( - 'title' => 'Content types', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'node') . '/content_types.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupal.form'), - ), - ); - - return $libraries; -} - -/** * Implements hook_system_info_alter(). * * The Content Translation module is deprecated in Drupal 8 in favor of the diff --git a/core/modules/openid/openid.library.yml b/core/modules/openid/openid.library.yml new file mode 100644 index 0000000..8c02914 --- /dev/null +++ b/core/modules/openid/openid.library.yml @@ -0,0 +1,12 @@ +drupal.openid: + title: OpenID + version: 8.0-dev + js: + - { data: openid.js } + css: + - { data: openid.css } + dependencies: + - system/jquery + - system/drupal + - system/jquery.cookie + - system/jquery.once diff --git a/core/modules/openid/openid.module b/core/modules/openid/openid.module index 51fe3c2..2aa4548 100644 --- a/core/modules/openid/openid.module +++ b/core/modules/openid/openid.module @@ -1110,27 +1110,3 @@ function openid_cron() { ->condition('expires', REQUEST_TIME, '<') ->execute(); } - -/** - * Implements hook_library_info(). - */ -function openid_library_info() { - $libraries['drupal.openid'] = array( - 'title' => 'OpenID', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'openid') . '/openid.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'openid') . '/openid.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.cookie'), - array('system', 'jquery.once'), - ), - ); - - return $libraries; -} diff --git a/core/modules/overlay/overlay.library.yml b/core/modules/overlay/overlay.library.yml new file mode 100644 index 0000000..ff97591 --- /dev/null +++ b/core/modules/overlay/overlay.library.yml @@ -0,0 +1,30 @@ +drupal.overlay.parent: + title: 'Overlay: Parent' + website: 'http://drupal.org/documentation/modules/overlay' + version: '1.0' + js: + - { data: overlay-parent.js } + css: + - { data: overlay-parent.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/drupal.displace + - system/drupal.tabbingmanager + - system/drupal.announce + - system/jquery.ui.core + - system/jquery.bbq +drupal.overlay.child: + title: 'Overlay: Child' + website: 'http://drupal.org/documentation/modules/overlay' + version: '1.0' + js: + - { data: overlay-child.js } + css: + - { data: overlay-child.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once diff --git a/core/modules/overlay/overlay.module b/core/modules/overlay/overlay.module index 1566740..c2c02d0 100644 --- a/core/modules/overlay/overlay.module +++ b/core/modules/overlay/overlay.module @@ -179,56 +179,6 @@ function overlay_init() { } /** - * Implements hook_library_info(). - */ -function overlay_library_info() { - $module_path = drupal_get_path('module', 'overlay'); - - // Overlay parent. - $libraries['drupal.overlay.parent'] = array( - 'title' => 'Overlay: Parent', - 'website' => 'http://drupal.org/documentation/modules/overlay', - 'version' => '1.0', - 'js' => array( - $module_path . '/overlay-parent.js' => array(), - ), - 'css' => array( - $module_path . '/overlay-parent.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'drupal.displace'), - array('system', 'drupal.tabbingmanager'), - array('system', 'drupal.announce'), - array('system', 'jquery.ui.core'), - array('system', 'jquery.bbq'), - ), - ); - // Overlay child. - $libraries['drupal.overlay.child'] = array( - 'title' => 'Overlay: Child', - 'website' => 'http://drupal.org/documentation/modules/overlay', - 'version' => '1.0', - 'js' => array( - $module_path . '/overlay-child.js' => array(), - ), - 'css' => array( - $module_path . '/overlay-child.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - ), - ); - - return $libraries; -} - -/** * Implements hook_drupal_goto_alter(). */ function overlay_drupal_goto_alter(&$path, &$options, &$http_response_code) { diff --git a/core/modules/path/path.library.yml b/core/modules/path/path.library.yml new file mode 100644 index 0000000..47de52d --- /dev/null +++ b/core/modules/path/path.library.yml @@ -0,0 +1,9 @@ +drupal.path: + title: Path + version: 8.0-dev + js: + - { data: path.js } + dependencies: + - system/jquery + - system/drupal + - system/drupal.form diff --git a/core/modules/path/path.module b/core/modules/path/path.module index 03be41b..c914163 100644 --- a/core/modules/path/path.module +++ b/core/modules/path/path.module @@ -333,23 +333,3 @@ function path_taxonomy_term_delete(Term $term) { // Delete all aliases associated with this term. Drupal::service('path.crud')->delete(array('source' => 'taxonomy/term/' . $term->id())); } - -/** - * Implements hook_library_info(). - */ -function path_library_info() { - $libraries['drupal.path'] = array( - 'title' => 'Path', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'path') . '/path.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupal.form'), - ), - ); - - return $libraries; -} diff --git a/core/modules/picture/picture.library.yml b/core/modules/picture/picture.library.yml new file mode 100644 index 0000000..b53cc52 --- /dev/null +++ b/core/modules/picture/picture.library.yml @@ -0,0 +1,8 @@ +picturefill: + title: Picturefill + website: 'http://drupal.org/node/1775530' + version: 8.0-dev + js: + - { data: picturefill/picturefill.js, type: file, weight: -10, group: 0 } + dependencies: + - system/matchmedia diff --git a/core/modules/picture/picture.module b/core/modules/picture/picture.module index 60d0f5b..5e05bcb 100644 --- a/core/modules/picture/picture.module +++ b/core/modules/picture/picture.module @@ -81,24 +81,6 @@ function picture_menu() { } /** - * Implements hook_library_info(). - */ -function picture_library_info() { - $libraries['picturefill'] = array( - 'title' => t('Picturefill'), - 'website' => 'http://drupal.org/node/1775530', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'picture') . '/picturefill/picturefill.js' => array('type' => 'file', 'weight' => -10, 'group' => JS_DEFAULT), - ), - 'dependencies' => array( - array('system', 'matchmedia'), - ), - ); - return $libraries; -} - -/** * Load one picture by its identifier. * * @param int $id diff --git a/core/modules/shortcut/shortcut.library.yml b/core/modules/shortcut/shortcut.library.yml new file mode 100644 index 0000000..717fc8f --- /dev/null +++ b/core/modules/shortcut/shortcut.library.yml @@ -0,0 +1,8 @@ +drupal.shortcut.admin: + title: Shortcut + version: 8.0-dev + js: + - { data: shortcut.admin.js } + dependencies: + - system/jquery + - system/drupal diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index d1458a8..75afc6a 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -563,22 +563,3 @@ function shortcut_toolbar() { return $items; } - -/** - * Implements hook_library_info(). - */ -function shortcut_library_info() { - $libraries['drupal.shortcut.admin'] = array( - 'title' => 'Shortcut', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'shortcut') . '/shortcut.admin.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - ), - ); - - return $libraries; -} diff --git a/core/modules/simpletest/simpletest.library.yml b/core/modules/simpletest/simpletest.library.yml new file mode 100644 index 0000000..565085b --- /dev/null +++ b/core/modules/simpletest/simpletest.library.yml @@ -0,0 +1,13 @@ +drupal.simpletest: + title: Simpletest + version: 8.0-dev + js: + - { data: simpletest.js } + css: + - { data: simpletest.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once + - system/drupal.tableselect diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index 06e56e7..d8aa119 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -682,31 +682,6 @@ function simpletest_mail_alter(&$message) { } /** - * Implements hook_library_info(). - */ -function simpletest_library_info() { - $libraries['drupal.simpletest'] = array( - 'title' => 'Simpletest', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'simpletest') . '/simpletest.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'simpletest') . '/simpletest.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - array('system', 'drupal.tableselect'), - ), - ); - - return $libraries; -} - -/** * Get PHPUnit Classes * * @param bool $name_only diff --git a/core/modules/statistics/statistics.library.yml b/core/modules/statistics/statistics.library.yml new file mode 100644 index 0000000..8f156c5 --- /dev/null +++ b/core/modules/statistics/statistics.library.yml @@ -0,0 +1,9 @@ +drupal.statistics: + title: Statistics + version: 8.0-dev + js: + - { data: statistics.js, scope: footer } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module index 9d0c19e..c17ba4d 100644 --- a/core/modules/statistics/statistics.module +++ b/core/modules/statistics/statistics.module @@ -243,28 +243,6 @@ function statistics_preprocess_block(&$variables) { } /** - * Implements hook_library_info(). - */ -function statistics_library_info() { - $libraries['drupal.statistics'] = array( - 'title' => 'Statistics', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'statistics') . '/statistics.js' => array( - 'scope' => 'footer' - ), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - ), - ); - - return $libraries; -} - -/** * Implements hook_block_alter(). * * Removes the "popular" block from display if the module is not configured diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php index 5360a83..71c01c5 100644 --- a/core/modules/system/system.api.php +++ b/core/modules/system/system.api.php @@ -423,14 +423,14 @@ function hook_library_info() { * * @see hook_library_info() */ -function hook_library_info_alter(&$libraries, $module) { +function hook_library_info_alter(&$libraries, $name) { // Update Farbtastic to version 2.0. - if ($module == 'system' && isset($libraries['farbtastic'])) { + if ($name == 'system/farbtastic') { // Verify existing version is older than the one we are updating to. - if (version_compare($libraries['farbtastic']['version'], '2.0', '<')) { + if (version_compare($libraries['version'], '2.0', '<')) { // Update the existing Farbtastic to version 2.0. - $libraries['farbtastic']['version'] = '2.0'; - $libraries['farbtastic']['js'] = array( + $libraries['version'] = '2.0'; + $libraries['js'] = array( drupal_get_path('module', 'farbtastic_update') . '/farbtastic-2.0.js' => array(), ); } diff --git a/core/modules/system/system.library.yml b/core/modules/system/system.library.yml new file mode 100644 index 0000000..203f005 --- /dev/null +++ b/core/modules/system/system.library.yml @@ -0,0 +1,676 @@ +drupal: + title: Drupal + version: 8.0-dev + js: + - { data: core/misc/drupal.js, group: -100, weight: -18 } + dependencies: + - system/domready +drupalSettings: + title: 'Drupal Settings' + version: 8.0-dev + js: + 1: { data: [], type: setting } +drupal.ajax: + title: 'Drupal AJAX' + website: 'http://api.drupal.org/api/group/ajax/8' + version: 8.0-dev + js: + - { data: core/misc/ajax.js, group: -100, weight: 2 } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/drupal.progress + - system/jquery.once +drupal.announce: + title: 'Drupal announce' + version: 8.0-dev + js: + - { data: core/misc/announce.js, group: -100 } + dependencies: + - system/drupal + - system/drupal.debounce +drupal.batch: + title: 'Drupal batch API' + version: 8.0-dev + js: + - { data: core/misc/batch.js, group: 0, cache: false } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/drupal.progress + - system/jquery.once +drupal.progress: + title: 'Drupal progress indicator' + version: 8.0-dev + js: + - { data: core/misc/progress.js, group: 0 } + dependencies: + - system/drupal + - system/jquery + - system/drupalSettings +drupal.form: + title: 'Drupal form library' + version: 8.0-dev + js: + - { data: core/misc/form.js, group: -100, weight: 1 } + dependencies: + - system/jquery + - system/drupal + - system/jquery.cookie + - system/jquery.once +drupal.dialog: + title: 'Drupal Dialog' + version: 8.0-dev + js: + - { data: core/misc/dialog.js, group: -100 } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.ui.dialog +drupal.dialog.ajax: + title: 'Drupal Dialog AJAX' + version: 8.0-dev + js: + - { data: core/misc/dialog.ajax.js, group: -100, weight: 3 } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/drupal.ajax + - system/drupal.dialog +drupal.states: + title: 'Drupal states' + version: 8.0-dev + js: + - { data: core/misc/states.js, group: -100, weight: 1 } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once +drupal.tabledrag: + title: 'Drupal tabledrag' + version: 8.0-dev + js: + - { data: core/misc/tabledrag.js, group: -100, weight: -1 } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once + - system/jquery.cookie +drupal.tableresponsive: + title: 'Drupal responsive table API' + version: 8.0-dev + js: + - { data: core/misc/tableresponsive.js, group: -100 } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once +drupal.collapse: + title: 'Collapsible details' + version: 8.0-dev + js: + - { data: core/misc/collapse.js, group: 0 } + dependencies: + - system/jquery + - system/modernizr + - system/drupal + - system/drupal.form + - system/jquery.once +drupal.autocomplete: + title: 'Drupal autocomplete' + version: 8.0-dev + js: + - { data: core/misc/autocomplete.js, group: 0 } + dependencies: + - system/jquery + - system/drupal + - system/drupal.ajax +drupal.displace: + title: 'Drupal displace' + version: 8.0-dev + js: + - { data: core/misc/displace.js, group: -100 } + dependencies: + - system/jquery + - system/drupal + - system/drupal.debounce +drupal.tabbingmanager: + title: 'Drupal tabbing manager' + version: 8.0-dev + js: + - { data: core/misc/tabbingmanager.js, 0: group, 1: -100 } + dependencies: + - system/jquery + - system/jquery.ui.core + - system/drupal +drupal.debounce: + title: 'Drupal debounce' + version: 8.0-dev + js: + - { data: core/misc/debounce.js, group: -100 } + dependencies: + - system/drupal +domready: + title: domReady + website: 'https://github.com/ded/domready' + version: master + js: + - { data: core/misc/domready/ready.min.js, group: -100, weight: -21 } +jquery: + title: jQuery + website: 'http://jquery.com' + version: '2.0' + js: + - { data: core/misc/jquery.js, group: -100, weight: -20 } +jquery.once: + title: 'jQuery Once' + website: 'http://plugins.jquery.com/project/once' + version: '1.2' + js: + - { data: core/misc/jquery.once.js, group: -100, weight: -19 } + dependencies: + - system/jquery +jquery.form: + title: 'jQuery Form Plugin' + website: 'http://malsup.com/jquery/form/' + version: '3.27' + js: + - { data: core/misc/jquery.form.js } + dependencies: + - system/jquery + - system/jquery.cookie +jquery.bbq: + title: 'jQuery BBQ' + website: 'http://benalman.com/projects/jquery-bbq-plugin/' + version: 1.3pre + js: + - { data: core/misc/jquery.ba-bbq.js } + dependencies: + - system/jquery +drupal.dropbutton: + title: Dropbutton + website: 'http://drupal.org/node/1608878' + version: '1.0' + js: + - { data: core/misc/dropbutton/dropbutton.js } + css: + - { data: core/misc/dropbutton/dropbutton.base.css } + - { data: core/misc/dropbutton/dropbutton.theme.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once +drupal.vertical-tabs: + title: 'Vertical Tabs' + website: 'http://drupal.org/node/323112' + version: '1.0' + js: + - { data: core/misc/vertical-tabs.js } + css: + - { data: core/misc/vertical-tabs.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/drupal.form +matchmedia: + title: 'window.matchMedia polyfill' + website: 'http://drupal.org/node/1815602' + version: 8.0-dev + js: + - { data: core/misc/matchmedia.js } +jquery.farbtastic: + title: Farbtastic + website: 'http://code.google.com/p/farbtastic/' + version: '1.2' + js: + - { data: core/misc/farbtastic/farbtastic.js } + css: + - { data: core/misc/farbtastic/farbtastic.css } +html5shiv: + title: html5shiv + website: 'https://github.com/aFarkas/html5shiv/' + version: 3.6.2 + js: + - { data: core/misc/html5.js, group: -100, weight: -22, browsers: { IE: 'lte IE 8', '!IE': false } } +modernizr: + title: Modernizr + website: 'http://modernizr.com/' + version: 2.6.2 + js: + - { data: core/misc/modernizr/modernizr.min.js, every_page: true, group: -100, preprocess: 0, scope: header, weight: -21 } +normalize: + title: normalize.css + website: 'http://git.io/normalize' + version: 2.1.2 + css: + - { data: core/misc/normalize/normalize.css, every_page: true, weight: -10 } +jquery.ui.core: + title: 'jQuery UI: Core' + website: 'http://jqueryui.com' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.core.js, group: -100, weight: -11 } + css: + - { data: core/misc/ui/themes/base/jquery.ui.core.css } + - { data: core/misc/ui/themes/base/jquery.ui.theme.css } + dependencies: + - system/jquery +jquery.ui.accordion: + title: 'jQuery UI: Accordion' + website: 'http://jqueryui.com/demos/accordion/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.accordion.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.accordion.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget +jquery.ui.autocomplete: + title: 'jQuery UI: Autocomplete' + website: 'http://jqueryui.com/demos/autocomplete/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.autocomplete.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.autocomplete.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget + - system/jquery.ui.position + - system/jquery.ui.menu +jquery.ui.button: + title: 'jQuery UI: Button' + website: 'http://jqueryui.com/demos/button/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.button.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.button.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget +jquery.ui.datepicker: + title: 'jQuery UI: Date Picker' + website: 'http://jqueryui.com/demos/datepicker/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.datepicker.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.datepicker.css } + dependencies: + - system/jquery.ui.core +jquery.ui.dialog: + title: 'jQuery UI: Dialog' + website: 'http://jqueryui.com/demos/dialog/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.dialog.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.dialog.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget + - system/jquery.ui.button + - system/jquery.ui.draggable + - system/jquery.ui.mouse + - system/jquery.ui.position + - system/jquery.ui.resizable +jquery.ui.draggable: + title: 'jQuery UI: Draggable' + website: 'http://jqueryui.com/demos/draggable/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.draggable.js } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.mouse + - system/jquery.ui.widget +jquery.ui.droppable: + title: 'jQuery UI: Droppable' + website: 'http://jqueryui.com/demos/droppable/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.droppable.js } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget + - system/jquery.ui.mouse + - system/jquery.ui.draggable +jquery.ui.menu: + title: 'jQuery UI: Mouse' + website: 'http://docs.jquery.com/UI/Menu' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.menu.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.menu.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget +jquery.ui.mouse: + title: 'jQuery UI: Mouse' + website: 'http://docs.jquery.com/UI/Mouse' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.mouse.js } + dependencies: + - system/jquery.ui.widget +jquery.ui.position: + title: 'jQuery UI: Position' + website: 'http://jqueryui.com/demos/position/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.position.js } +jquery.ui.progressbar: + title: 'jQuery UI: Progress Bar' + website: 'http://jqueryui.com/demos/progressbar/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.progressbar.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.progressbar.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget +jquery.ui.resizable: + title: 'jQuery UI: Resizable' + website: 'http://jqueryui.com/demos/resizable/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.resizable.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.resizable.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget + - system/jquery.ui.mouse +jquery.ui.selectable: + title: 'jQuery UI: Selectable' + website: 'http://jqueryui.com/demos/selectable/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.selectable.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.selectable.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.mouse + - system/jquery.ui.widget +jquery.ui.slider: + title: 'jQuery UI: Slider' + website: 'http://jqueryui.com/demos/slider/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.slider.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.slider.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.mouse + - system/jquery.ui.widget +jquery.ui.sortable: + title: 'jQuery UI: Sortable' + website: 'http://jqueryui.com/demos/sortable/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.sortable.js } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.mouse + - system/jquery.ui.widget +jquery.ui.spinner: + title: 'jQuery UI: Spinner' + website: 'http://jqueryui.com/demos/spinner/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.spinner.js } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget + - system/jquery.ui.button +jquery.ui.tabs: + title: 'jQuery UI: Tabs' + website: 'http://jqueryui.com/demos/tabs/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.tabs.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.tabs.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget +jquery.ui.tooltip: + title: 'jQuery UI: Tooltip' + website: 'http://jqueryui.com/demos/tooltip/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.tooltip.js } + css: + - { data: core/misc/ui/themes/base/jquery.ui.tooltip.css } + dependencies: + - system/jquery.ui.core + - system/jquery.ui.widget + - system/jquery.ui.position +jquery.ui.widget: + title: 'jQuery UI: Widget' + website: 'http://docs.jquery.com/UI/Widget' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.ui.widget.js, group: -100, weight: -10 } + dependencies: + - system/jquery.ui.core +jquery.effects.core: + title: 'jQuery UI: Effects' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.core.js, group: -100, weight: -9 } +jquery.effects.blind: + title: 'jQuery UI: Effects Blind' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.blind.js } + dependencies: + - system/jquery.effects.core +jquery.effects.bounce: + title: 'jQuery UI: Effects Bounce' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.bounce.js } + dependencies: + - system/jquery.effects.core +jquery.effects.clip: + title: 'jQuery UI: Effects Clip' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.clip.js } + dependencies: + - system/jquery.effects.core +jquery.effects.drop: + title: 'jQuery UI: Effects Drop' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.drop.js } + dependencies: + - system/jquery.effects.core +jquery.effects.explode: + title: 'jQuery UI: Effects Explode' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.explode.js } + dependencies: + - system/jquery.effects.core +jquery.effects.fade: + title: 'jQuery UI: Effects Fade' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.fade.js } + dependencies: + - system/jquery.effects.core +jquery.effects.fold: + title: 'jQuery UI: Effects Fold' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.fold.js } + dependencies: + - system/jquery.effects.core +jquery.effects.highlight: + title: 'jQuery UI: Effects Highlight' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.highlight.js } + dependencies: + - system/jquery.effects.core +jquery.effects.pulsate: + title: 'jQuery UI: Effects Pulsate' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.pulsate.js } + dependencies: + - system/jquery.effects.core +jquery.effects.scale: + title: 'jQuery UI: Effects Scale' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.scale.js } + dependencies: + - system/jquery.effects.core +jquery.effects.shake: + title: 'jQuery UI: Effects Shake' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.shake.js } + dependencies: + - system/jquery.effects.core +jquery.effects.slide: + title: 'jQuery UI: Effects Slide' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.slide.js } + dependencies: + - system/jquery.effects.core +jquery.effects.transfer: + title: 'jQuery UI: Effects Transfer' + website: 'http://jqueryui.com/demos/effect/' + version: 1.10.2 + js: + - { data: core/misc/ui/ui/jquery.effects.transfer.js } + dependencies: + - system/jquery.effects.core +jquery.ui.touch-punch: + title: 'jQuery UI Touch Punch' + website: 'http://jqueryui.com/demos/effect/' + version: 0.2.2 + js: + - { data: core/misc/jquery.ui.touch-punch.js } + dependencies: + - system/jquery.ui.core +underscore: + title: Underscore.js + website: 'http://underscorejs.org/' + version: 1.4.0 + js: + - { data: core/misc/underscore/underscore.js, group: -100, weight: -20 } +backbone: + title: Backbone.js + website: 'http://backbonejs.org/' + version: 0.9.2 + js: + - { data: core/misc/backbone/backbone.js, group: -100, weight: -19 } + dependencies: + - system/underscore +jquery.cookie: + title: Cookie + website: 'http://plugins.jquery.com/project/cookie' + version: 1.10.2 + js: + - { data: core/misc/ui/external/jquery.cookie.js } + dependencies: + - system/jquery +drupal.tableselect: + title: Tableselect + version: 8.0-dev + js: + - { data: core/misc/tableselect.js } + dependencies: + - system/drupal + - system/jquery +drupal.tableheader: + title: 'Table header' + version: 8.0-dev + js: + - { data: core/misc/tableheader.js } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once + - system/drupal.displace +drupal.timezone: + title: Timezone + version: 8.0-dev + js: + - { data: core/misc/timezone.js } + dependencies: + - system/jquery + - system/drupal +drupal.machine-name: + title: 'Machine name' + version: 8.0-dev + js: + - { data: core/misc/machine-name.js } + dependencies: + - system/jquery + - system/jquery.once + - system/drupal + - system/drupalSettings +drupal.system: + title: System + version: 8.0-dev + js: + - { data: system.js } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once +drupal.system.cron: + title: 'System cron' + version: 8.0-dev + js: + - { data: system.cron.js } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once +drupal.system.modules: + title: 'System modules' + version: 8.0-dev + js: + - { data: system.modules.js } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 4d2f61e..0693c73 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -1184,1004 +1184,6 @@ function _system_batch_theme() { } /** - * Implements hook_library_info(). - */ -function system_library_info() { - // Drupal-specific JavaScript. - $libraries['drupal'] = array( - 'title' => 'Drupal', - 'version' => VERSION, - 'js' => array( - 'core/misc/drupal.js' => array('group' => JS_LIBRARY, 'weight' => -18), - ), - 'dependencies' => array( - array('system', 'domready'), - ), - ); - - // Drupal settings. - $libraries['drupalSettings'] = array( - 'title' => 'Drupal Settings', - 'version' => VERSION, - 'js' => array( - array('type' => 'setting', 'data' => array()), - ), - ); - - // Drupal's Ajax framework. - $libraries['drupal.ajax'] = array( - 'title' => 'Drupal AJAX', - 'website' => 'http://api.drupal.org/api/group/ajax/8', - 'version' => VERSION, - 'js' => array( - 'core/misc/ajax.js' => array('group' => JS_LIBRARY, 'weight' => 2), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'drupal.progress'), - array('system', 'jquery.once'), - ), - ); - - // Drupal's Screen Reader change announcement utility. - $libraries['drupal.announce'] = array( - 'title' => 'Drupal announce', - 'version' => VERSION, - 'js' => array( - 'core/misc/announce.js' => array('group' => JS_LIBRARY), - ), - 'dependencies' => array( - array('system', 'drupal'), - array('system', 'drupal.debounce'), - ), - ); - - // Drupal's batch API. - $libraries['drupal.batch'] = array( - 'title' => 'Drupal batch API', - 'version' => VERSION, - 'js' => array( - 'core/misc/batch.js' => array('group' => JS_DEFAULT, 'cache' => FALSE), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'drupal.progress'), - array('system', 'jquery.once'), - ), - ); - - // Drupal's progress indicator. - $libraries['drupal.progress'] = array( - 'title' => 'Drupal progress indicator', - 'version' => VERSION, - 'js' => array( - 'core/misc/progress.js' => array('group' => JS_DEFAULT), - ), - 'dependencies' => array( - array('system', 'drupal'), - array('system', 'jquery'), - array('system', 'drupalSettings'), - ), - ); - - // Drupal's form library. - $libraries['drupal.form'] = array( - 'title' => 'Drupal form library', - 'version' => VERSION, - 'js' => array( - 'core/misc/form.js' => array('group' => JS_LIBRARY, 'weight' => 1), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.cookie'), - array('system', 'jquery.once'), - ), - ); - - // Drupal's dialog component. - $libraries['drupal.dialog'] = array( - 'title' => 'Drupal Dialog', - 'version' => VERSION, - 'js' => array( - 'core/misc/dialog.js' => array('group' => JS_LIBRARY), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.ui.dialog') - ), - ); - - // Drupal's integration between AJAX and dialogs. - $libraries['drupal.dialog.ajax'] = array( - 'title' => 'Drupal Dialog AJAX', - 'version' => VERSION, - 'js' => array( - 'core/misc/dialog.ajax.js' => array('group' => JS_LIBRARY, 'weight' => 3), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'drupal.ajax'), - array('system', 'drupal.dialog'), - ), - ); - - // Drupal's states library. - $libraries['drupal.states'] = array( - 'title' => 'Drupal states', - 'version' => VERSION, - 'js' => array( - 'core/misc/states.js' => array('group' => JS_LIBRARY, 'weight' => 1), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - ), - ); - - // Drupal's tabledrag library. - $libraries['drupal.tabledrag'] = array( - 'title' => 'Drupal tabledrag', - 'version' => VERSION, - 'js' => array( - 'core/misc/tabledrag.js' => array('group' => JS_LIBRARY, 'weight' => -1), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - array('system', 'jquery.cookie'), - ), - ); - - // Drupal's responsive table API. - $libraries['drupal.tableresponsive'] = array( - 'title' => 'Drupal responsive table API', - 'version' => VERSION, - 'js' => array( - 'core/misc/tableresponsive.js' => array('group' => JS_LIBRARY), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - ), - ); - - // Collapsible details. - $libraries['drupal.collapse'] = array( - 'title' => 'Collapsible details', - 'version' => VERSION, - 'js' => array( - 'core/misc/collapse.js' => array('group' => JS_DEFAULT), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'modernizr'), - array('system', 'drupal'), - // collapse.js relies on drupalGetSummary in form.js - array('system', 'drupal.form'), - array('system', 'jquery.once'), - ), - ); - - // Drupal's autocomplete widget. - $libraries['drupal.autocomplete'] = array( - 'title' => 'Drupal autocomplete', - 'version' => VERSION, - 'js' => array( - 'core/misc/autocomplete.js' => array('group' => JS_DEFAULT), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupal.ajax'), - ), - ); - - // A utility that measures and reports viewport offset dimensions from - // elements like the toolbar that can potentially displace the positioning of - // elements like the overlay. - $libraries['drupal.displace'] = array( - 'title' => 'Drupal displace', - 'version' => VERSION, - 'js' => array( - 'core/misc/displace.js' => array('group' => JS_LIBRARY), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupal.debounce'), - ), - ); - - // Manages tab orders in the document. - $libraries['drupal.tabbingmanager'] = array( - 'title' => 'Drupal tabbing manager', - 'version' => VERSION, - 'js' => array( - 'core/misc/tabbingmanager.js' => array('group', JS_LIBRARY), - ), - 'dependencies' => array( - array('system', 'jquery'), - // Depends on jQuery UI Core to use the ":tabbable" pseudo selector. - array('system', 'jquery.ui.core'), - array('system', 'drupal'), - ), - ); - - // A utility function to limit calls to a function with a given time. - $libraries['drupal.debounce'] = array( - 'title' => 'Drupal debounce', - 'version' => VERSION, - 'js' => array( - 'core/misc/debounce.js' => array('group' => JS_LIBRARY), - ), - 'dependencies' => array( - // @todo remove drupal dependency. - array('system', 'drupal'), - ), - ); - - // domReady. - $libraries['domready'] = array( - 'title' => 'domReady', - 'website' => 'https://github.com/ded/domready', - 'version' => 'master', - 'js' => array( - 'core/misc/domready/ready.min.js' => array('group' => JS_LIBRARY, 'weight' => -21), - ), - ); - - // jQuery. - $libraries['jquery'] = array( - 'title' => 'jQuery', - 'website' => 'http://jquery.com', - 'version' => '2.0', - 'js' => array( - 'core/misc/jquery.js' => array('group' => JS_LIBRARY, 'weight' => -20), - ), - ); - - // jQuery Once. - $libraries['jquery.once'] = array( - 'title' => 'jQuery Once', - 'website' => 'http://plugins.jquery.com/project/once', - 'version' => '1.2', - 'js' => array( - 'core/misc/jquery.once.js' => array('group' => JS_LIBRARY, 'weight' => -19), - ), - 'dependencies' => array( - array('system', 'jquery'), - ), - ); - - // jQuery Form Plugin. - $libraries['jquery.form'] = array( - 'title' => 'jQuery Form Plugin', - 'website' => 'http://malsup.com/jquery/form/', - 'version' => '3.27', - 'js' => array( - 'core/misc/jquery.form.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'jquery.cookie'), - ), - ); - - // jQuery BBQ plugin. - $libraries['jquery.bbq'] = array( - 'title' => 'jQuery BBQ', - 'website' => 'http://benalman.com/projects/jquery-bbq-plugin/', - 'version' => '1.3pre', - 'js' => array( - 'core/misc/jquery.ba-bbq.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - ), - ); - - // Dropbutton. - $libraries['drupal.dropbutton'] = array( - 'title' => 'Dropbutton', - 'website' => 'http://drupal.org/node/1608878', - 'version' => '1.0', - 'js' => array( - 'core/misc/dropbutton/dropbutton.js' => array(), - ), - 'css' => array( - 'core/misc/dropbutton/dropbutton.base.css' => array(), - 'core/misc/dropbutton/dropbutton.theme.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - ), - ); - - // Vertical Tabs. - $libraries['drupal.vertical-tabs'] = array( - 'title' => 'Vertical Tabs', - 'website' => 'http://drupal.org/node/323112', - 'version' => '1.0', - 'js' => array( - 'core/misc/vertical-tabs.js' => array(), - ), - 'css' => array( - 'core/misc/vertical-tabs.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - // Vertical tabs relies on drupalGetSummary in form.js - array('system', 'drupal.form'), - ), - ); - - // matchMedia polyfill. - $libraries['matchmedia'] = array( - 'title' => 'window.matchMedia polyfill', - 'website' => 'http://drupal.org/node/1815602', - 'version' => VERSION, - 'js' => array( - 'core/misc/matchmedia.js' => array(), - ), - ); - - // Farbtastic. - $libraries['jquery.farbtastic'] = array( - 'title' => 'Farbtastic', - 'website' => 'http://code.google.com/p/farbtastic/', - 'version' => '1.2', - 'js' => array( - 'core/misc/farbtastic/farbtastic.js' => array(), - ), - 'css' => array( - 'core/misc/farbtastic/farbtastic.css' => array(), - ), - ); - - // HTML5 Shiv. - $libraries['html5shiv'] = array( - 'title' => 'html5shiv', - 'website' => 'https://github.com/aFarkas/html5shiv/', - 'version' => '3.6.2', - 'js' => array( - 'core/misc/html5.js' => array( - 'group' => JS_LIBRARY, - 'weight' => -22, - 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE), - ), - ), - ); - - // Modernizr. - $libraries['modernizr'] = array( - 'title' => 'Modernizr', - 'website' => 'http://modernizr.com/', - 'version' => '2.6.2', - 'js' => array( - 'core/misc/modernizr/modernizr.min.js' => array( - 'every_page' => TRUE, - 'group' => JS_LIBRARY, - 'preprocess' => 0, - 'scope' => 'header', - 'weight' => -21, - ), - ), - ); - - // Normalize. - $libraries['normalize'] = array( - 'title' => 'normalize.css', - 'website' => 'http://git.io/normalize', - 'version' => '2.1.2', - 'css' => array( - 'core/misc/normalize/normalize.css' => array( - 'every_page' => TRUE, - 'weight' => -10, - ), - ), - ); - - // jQuery UI. - $libraries['jquery.ui.core'] = array( - 'title' => 'jQuery UI: Core', - 'website' => 'http://jqueryui.com', - 'version' => '1.10.2', - 'js' => array( - 'core/misc/ui/ui/jquery.ui.core.js' => array('group' => JS_LIBRARY, 'weight' => -11), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.core.css' => array(), - 'core/misc/ui/themes/base/jquery.ui.theme.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - ), - ); - $libraries['jquery.ui.accordion'] = array( - 'title' => 'jQuery UI: Accordion', - 'website' => 'http://jqueryui.com/demos/accordion/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.accordion.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.accordion.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.autocomplete'] = array( - 'title' => 'jQuery UI: Autocomplete', - 'website' => 'http://jqueryui.com/demos/autocomplete/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.autocomplete.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.autocomplete.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - array('system', 'jquery.ui.position'), - array('system', 'jquery.ui.menu'), - ), - ); - $libraries['jquery.ui.button'] = array( - 'title' => 'jQuery UI: Button', - 'website' => 'http://jqueryui.com/demos/button/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.button.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.button.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.datepicker'] = array( - 'title' => 'jQuery UI: Date Picker', - 'website' => 'http://jqueryui.com/demos/datepicker/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.datepicker.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.datepicker.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - ), - ); - $libraries['jquery.ui.dialog'] = array( - 'title' => 'jQuery UI: Dialog', - 'website' => 'http://jqueryui.com/demos/dialog/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.dialog.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.dialog.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - array('system', 'jquery.ui.button'), - array('system', 'jquery.ui.draggable'), - array('system', 'jquery.ui.mouse'), - array('system', 'jquery.ui.position'), - array('system', 'jquery.ui.resizable'), - ), - ); - $libraries['jquery.ui.draggable'] = array( - 'title' => 'jQuery UI: Draggable', - 'website' => 'http://jqueryui.com/demos/draggable/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.draggable.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.mouse'), - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.droppable'] = array( - 'title' => 'jQuery UI: Droppable', - 'website' => 'http://jqueryui.com/demos/droppable/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.droppable.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - array('system', 'jquery.ui.mouse'), - array('system', 'jquery.ui.draggable'), - ), - ); - $libraries['jquery.ui.menu'] = array( - 'title' => 'jQuery UI: Mouse', - 'website' => 'http://docs.jquery.com/UI/Menu', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.menu.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.menu.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.mouse'] = array( - 'title' => 'jQuery UI: Mouse', - 'website' => 'http://docs.jquery.com/UI/Mouse', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.mouse.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.position'] = array( - 'title' => 'jQuery UI: Position', - 'website' => 'http://jqueryui.com/demos/position/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.position.js' => array(), - ), - ); - $libraries['jquery.ui.progressbar'] = array( - 'title' => 'jQuery UI: Progress Bar', - 'website' => 'http://jqueryui.com/demos/progressbar/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.progressbar.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.progressbar.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.resizable'] = array( - 'title' => 'jQuery UI: Resizable', - 'website' => 'http://jqueryui.com/demos/resizable/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.resizable.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.resizable.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - array('system', 'jquery.ui.mouse'), - ), - ); - $libraries['jquery.ui.selectable'] = array( - 'title' => 'jQuery UI: Selectable', - 'website' => 'http://jqueryui.com/demos/selectable/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.selectable.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.selectable.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.mouse'), - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.slider'] = array( - 'title' => 'jQuery UI: Slider', - 'website' => 'http://jqueryui.com/demos/slider/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.slider.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.slider.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.mouse'), - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.sortable'] = array( - 'title' => 'jQuery UI: Sortable', - 'website' => 'http://jqueryui.com/demos/sortable/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.sortable.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.mouse'), - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.spinner'] = array( - 'title' => 'jQuery UI: Spinner', - 'website' => 'http://jqueryui.com/demos/spinner/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.spinner.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - array('system', 'jquery.ui.button'), - ), - ); - $libraries['jquery.ui.tabs'] = array( - 'title' => 'jQuery UI: Tabs', - 'website' => 'http://jqueryui.com/demos/tabs/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.tabs.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.tabs.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - ), - ); - $libraries['jquery.ui.tooltip'] = array( - 'title' => 'jQuery UI: Tooltip', - 'website' => 'http://jqueryui.com/demos/tooltip/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.tooltip.js' => array(), - ), - 'css' => array( - 'core/misc/ui/themes/base/jquery.ui.tooltip.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - array('system', 'jquery.ui.widget'), - array('system', 'jquery.ui.position'), - ), - ); - $libraries['jquery.ui.widget'] = array( - 'title' => 'jQuery UI: Widget', - 'website' => 'http://docs.jquery.com/UI/Widget', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.ui.widget.js' => array('group' => JS_LIBRARY, 'weight' => -10), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - ), - ); - $libraries['jquery.effects.core'] = array( - 'title' => 'jQuery UI: Effects', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.core.js' => array('group' => JS_LIBRARY, 'weight' => -9), - ), - ); - $libraries['jquery.effects.blind'] = array( - 'title' => 'jQuery UI: Effects Blind', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.blind.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.bounce'] = array( - 'title' => 'jQuery UI: Effects Bounce', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.bounce.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.clip'] = array( - 'title' => 'jQuery UI: Effects Clip', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.clip.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.drop'] = array( - 'title' => 'jQuery UI: Effects Drop', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.drop.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.explode'] = array( - 'title' => 'jQuery UI: Effects Explode', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.explode.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.fade'] = array( - 'title' => 'jQuery UI: Effects Fade', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.fade.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.fold'] = array( - 'title' => 'jQuery UI: Effects Fold', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.fold.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.highlight'] = array( - 'title' => 'jQuery UI: Effects Highlight', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.highlight.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.pulsate'] = array( - 'title' => 'jQuery UI: Effects Pulsate', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.pulsate.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.scale'] = array( - 'title' => 'jQuery UI: Effects Scale', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.scale.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.shake'] = array( - 'title' => 'jQuery UI: Effects Shake', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.shake.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.slide'] = array( - 'title' => 'jQuery UI: Effects Slide', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.slide.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - $libraries['jquery.effects.transfer'] = array( - 'title' => 'jQuery UI: Effects Transfer', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => $libraries['jquery.ui.core']['version'], - 'js' => array( - 'core/misc/ui/ui/jquery.effects.transfer.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.effects.core'), - ), - ); - - // Touch Punch for jQuery UI touch support. - $libraries['jquery.ui.touch-punch'] = array( - 'title' => 'jQuery UI Touch Punch', - 'website' => 'http://jqueryui.com/demos/effect/', - 'version' => '0.2.2', - 'js' => array( - 'core/misc/jquery.ui.touch-punch.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery.ui.core'), - ), - ); - - // Underscore. - $libraries['underscore'] = array( - 'title' => 'Underscore.js', - 'website' => 'http://underscorejs.org/', - 'version' => '1.4.0', - 'js' => array( - 'core/misc/underscore/underscore.js' => array('group' => JS_LIBRARY, 'weight' => -20), - ), - ); - - // Backbone. - $libraries['backbone'] = array( - 'title' => 'Backbone.js', - 'website' => 'http://backbonejs.org/', - 'version' => '0.9.2', - 'js' => array( - 'core/misc/backbone/backbone.js' => array('group' => JS_LIBRARY, 'weight' => -19), - ), - 'dependencies' => array( - array('system', 'underscore'), - ), - ); - - // Cookie. - $libraries['jquery.cookie'] = array( - 'title' => 'Cookie', - 'website' => 'http://plugins.jquery.com/project/cookie', - 'version' => $libraries['jquery.ui.core']['version'], // Shipped with jQuery UI. - 'js' => array( - 'core/misc/ui/external/jquery.cookie.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - ), - ); - $libraries['drupal.tableselect'] = array( - 'title' => 'Tableselect', - 'version' => VERSION, - 'js' => array( - 'core/misc/tableselect.js' => array(), - ), - 'dependencies' => array( - array('system', 'drupal'), - array('system', 'jquery'), - ), - ); - $libraries['drupal.tableheader'] = array( - 'title' => 'Table header', - 'version' => VERSION, - 'js' => array( - 'core/misc/tableheader.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - array('system', 'drupal.displace'), - ), - ); - $libraries['drupal.timezone'] = array( - 'title' => 'Timezone', - 'version' => VERSION, - 'js' => array( - 'core/misc/timezone.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - ), - ); - $libraries['drupal.machine-name'] = array( - 'title' => 'Machine name', - 'version' => VERSION, - 'js' => array( - 'core/misc/machine-name.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'jquery.once'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - ), - ); - - $libraries['drupal.system'] = array( - 'title' => 'System', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'system') . '/system.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - ), - ); - $libraries['drupal.system.cron'] = array( - 'title' => 'System cron', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'system') . '/system.cron.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - ), - ); - $libraries['drupal.system.modules'] = array( - 'title' => 'System modules', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'system') . '/system.modules.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - ), - ); - - return $libraries; -} - -/** * Implements hook_stream_wrappers(). */ function system_stream_wrappers() { diff --git a/core/modules/system/tests/modules/common_test/common_test.module b/core/modules/system/tests/modules/common_test/common_test.module index ef6f1a1..6e86cb6 100644 --- a/core/modules/system/tests/modules/common_test/common_test.module +++ b/core/modules/system/tests/modules/common_test/common_test.module @@ -263,12 +263,12 @@ function theme_common_test_foo($variables) { /** * Implements hook_library_info_alter(). */ -function common_test_library_info_alter(&$libraries, $module) { - if ($module == 'system' && isset($libraries['jquery.farbtastic'])) { +function common_test_library_info_alter(&$libraries, $name) { + if ($name == 'system/jquery.farbtastic') { // Change the title of Farbtastic to "Farbtastic: Altered Library". - $libraries['jquery.farbtastic']['title'] = 'Farbtastic: Altered Library'; + $libraries['title'] = 'Farbtastic: Altered Library'; // Make Farbtastic depend on jQuery Form to test library dependencies. - $libraries['jquery.farbtastic']['dependencies'][] = array('system', 'jquery.form'); + $libraries['dependencies'][] = array('system', 'jquery.form'); } } diff --git a/core/modules/taxonomy/taxonomy.library.yml b/core/modules/taxonomy/taxonomy.library.yml new file mode 100644 index 0000000..0650eaa --- /dev/null +++ b/core/modules/taxonomy/taxonomy.library.yml @@ -0,0 +1,12 @@ +drupal.taxonomy: + title: Taxonomy + version: 8.0-dev + js: + - { data: taxonomy.js } + css: + - { data: taxonomy.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/drupal.tabledrag diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 2557008..03baa9b 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -1273,27 +1273,3 @@ function taxonomy_taxonomy_term_delete(Term $term) { /** * @} End of "defgroup taxonomy_index". */ - -/** - * Implements hook_library_info(). - */ -function taxonomy_library_info() { - $libraries['drupal.taxonomy'] = array( - 'title' => 'Taxonomy', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'taxonomy') . '/taxonomy.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'taxonomy') . '/taxonomy.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'drupal.tabledrag'), - ), - ); - - return $libraries; -} diff --git a/core/modules/text/text.library.yml b/core/modules/text/text.library.yml new file mode 100644 index 0000000..11cb16e --- /dev/null +++ b/core/modules/text/text.library.yml @@ -0,0 +1,9 @@ +drupal.text: + title: Text + version: 8.0-dev + js: + - { data: text.js } + dependencies: + - system/jquery + - system/jquery.once + - system/drupal diff --git a/core/modules/text/text.module b/core/modules/text/text.module index 4bf51b6..97a2dd5 100644 --- a/core/modules/text/text.module +++ b/core/modules/text/text.module @@ -8,26 +8,6 @@ use Drupal\Core\Entity\EntityInterface; /** - * Implements hook_library_info(). - */ -function text_library_info() { - $libraries['drupal.text'] = array( - 'title' => 'Text', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'text') . '/text.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'jquery.once'), - array('system', 'drupal'), - ), - ); - - return $libraries; -} - -/** * Implements hook_help(). */ function text_help($path, $arg) { diff --git a/core/modules/toolbar/toolbar.library.yml b/core/modules/toolbar/toolbar.library.yml new file mode 100644 index 0000000..6742f24 --- /dev/null +++ b/core/modules/toolbar/toolbar.library.yml @@ -0,0 +1,29 @@ +toolbar: + title: Toolbar + version: 8.0-dev + js: + - { data: js/toolbar.js } + css: + 3: { data: css/toolbar.base.css } + 4: { data: css/toolbar.theme.css } + 5: { data: css/toolbar.icons.css } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/matchmedia + - system/jquery.once + - system/drupal.debounce + - system/drupal.displace + - toolbar/toolbar.menu +toolbar.menu: + title: 'Toolbar nested accordion menus.' + version: 8.0-dev + js: + - { data: js/toolbar.menu.js } + css: + 1: { data: css/toolbar.menu.css } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once diff --git a/core/modules/toolbar/toolbar.module b/core/modules/toolbar/toolbar.module index 5bc4534..639d2bc 100644 --- a/core/modules/toolbar/toolbar.module +++ b/core/modules/toolbar/toolbar.module @@ -575,52 +575,6 @@ function toolbar_in_active_trail($path) { } /** - * Implements hook_library_info(). - */ -function toolbar_library_info() { - $libraries['toolbar'] = array( - 'title' => 'Toolbar', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'toolbar') . '/js/toolbar.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'toolbar') . '/css/toolbar.base.css', - drupal_get_path('module', 'toolbar') . '/css/toolbar.theme.css', - drupal_get_path('module', 'toolbar') . '/css/toolbar.icons.css', - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'matchmedia'), - array('system', 'jquery.once'), - array('system', 'drupal.debounce'), - array('system', 'drupal.displace'), - array('toolbar', 'toolbar.menu'), - ), - ); - - $libraries['toolbar.menu'] = array( - 'title' => 'Toolbar nested accordion menus.', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'toolbar') . '/js/toolbar.menu.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'toolbar') . '/css/toolbar.menu.css', - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - ), - ); - - return $libraries; -} - -/** * Returns the hash of the per-user rendered toolbar subtrees. */ function _toolbar_get_subtree_hash() { diff --git a/core/modules/tour/tour.library.yml b/core/modules/tour/tour.library.yml new file mode 100644 index 0000000..eee583d --- /dev/null +++ b/core/modules/tour/tour.library.yml @@ -0,0 +1,27 @@ +tour: + title: Tour + version: 8.0-dev + js: + - { data: js/tour.js, group: -100, weight: -1 } + dependencies: + - system/jquery + - system/drupal + - system/backbone + - tour/jquery.joyride + - tour/tour-styling +tour-styling: + title: Tour + version: 8.0-dev + css: + - { data: css/tour.css, media: screen } +jquery.joyride: + title: Joyride + website: 'https://github.com/zurb/joyride' + version: 2.0.3 + js: + - { data: js/jquery.joyride-2.0.3.js } + css: + - { data: css/joyride-2.0.3.css, media: screen } + dependencies: + - system/jquery + - system/jquery.cookie diff --git a/core/modules/tour/tour.module b/core/modules/tour/tour.module index fe9bc1a..8a375c2 100644 --- a/core/modules/tour/tour.module +++ b/core/modules/tour/tour.module @@ -19,56 +19,6 @@ function tour_permission() { } /** - * Implements hook_library_info(). - */ -function tour_library_info() { - $path = drupal_get_path('module', 'tour'); - - $libraries['tour'] = array( - 'title' => 'Tour', - 'version' => VERSION, - 'js' => array( - // Add the JavaScript, with a group and weight such that it will run - // before modules/overlay/overlay-parent.js. - $path . '/js/tour.js' => array('group' => JS_LIBRARY, 'weight' => -1), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'backbone'), - array('tour', 'jquery.joyride'), - array('tour', 'tour-styling'), - ), - ); - - $libraries['tour-styling'] = array( - 'title' => 'Tour', - 'version' => VERSION, - 'css' => array( - $path . '/css/tour.css' => array('media' => 'screen'), - ) - ); - - $libraries['jquery.joyride'] = array( - 'title' => 'Joyride', - 'website' => 'https://github.com/zurb/joyride', - 'version' => '2.0.3', - 'js' => array( - $path . '/js/jquery.joyride-2.0.3.js' => array(), - ), - 'css' => array( - $path . '/css/joyride-2.0.3.css' => array('media' => 'screen'), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'jquery.cookie'), - ), - ); - - return $libraries; -} - -/** * Implements hook_toolbar(). */ function tour_toolbar() { diff --git a/core/modules/translation_entity/translation_entity.library.yml b/core/modules/translation_entity/translation_entity.library.yml new file mode 100644 index 0000000..7725dd1 --- /dev/null +++ b/core/modules/translation_entity/translation_entity.library.yml @@ -0,0 +1,11 @@ +drupal.translation_entity.admin: + title: 'Translation entity UI' + version: 8.0-dev + js: + - { data: translation_entity.admin.js } + css: + - { data: translation_entity.admin.css } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once diff --git a/core/modules/translation_entity/translation_entity.module b/core/modules/translation_entity/translation_entity.module index 82bd66d..be3cd71 100644 --- a/core/modules/translation_entity/translation_entity.module +++ b/core/modules/translation_entity/translation_entity.module @@ -351,30 +351,6 @@ function translation_entity_delete_access(EntityInterface $entity, Language $lan } /** - * Implements hook_library_info(). - */ -function translation_entity_library_info() { - $path = drupal_get_path('module', 'translation_entity'); - $libraries['drupal.translation_entity.admin'] = array( - 'title' => 'Translation entity UI', - 'version' => VERSION, - 'js' => array( - $path . '/translation_entity.admin.js' => array(), - ), - 'css' => array( - $path . '/translation_entity.admin.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - ), - ); - - return $libraries; -} - -/** * Returns the key name used to store the configuration setting. * * Based on the entity type and bundle, the keys used to store configuration diff --git a/core/modules/user/user.library.yml b/core/modules/user/user.library.yml new file mode 100644 index 0000000..33235fa --- /dev/null +++ b/core/modules/user/user.library.yml @@ -0,0 +1,20 @@ +drupal.user: + title: User + version: 8.0-dev + js: + - { data: user.js } + css: + - { data: user.css } + dependencies: + - system/jquery + - system/drupal + - system/jquery.once +drupal.user.permissions: + title: 'User permissions' + version: 8.0-dev + js: + - { data: user.permissions.js } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings diff --git a/core/modules/user/user.module b/core/modules/user/user.module index 322311f..ffaee09 100644 --- a/core/modules/user/user.module +++ b/core/modules/user/user.module @@ -2745,39 +2745,3 @@ function user_toolbar() { return $items; } - -/** - * Implements hook_library_info(). - */ -function user_library_info() { - $libraries['drupal.user'] = array( - 'title' => 'User', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'user') . '/user.js' => array(), - ), - 'css' => array( - drupal_get_path('module', 'user') . '/user.css' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'jquery.once'), - ), - ); - - $libraries['drupal.user.permissions'] = array( - 'title' => 'User permissions', - 'version' => VERSION, - 'js' => array( - drupal_get_path('module', 'user') . '/user.permissions.js' => array(), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - ), - ); - - return $libraries; -} diff --git a/core/modules/views/views.library.yml b/core/modules/views/views.library.yml new file mode 100644 index 0000000..ebd394a --- /dev/null +++ b/core/modules/views/views.library.yml @@ -0,0 +1,21 @@ +views.ajax: + title: 'Views AJAX' + version: 8.0-dev + js: + - { data: js/base.js, group: 0 } + - { data: js/ajax_view.js, group: 0 } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once + - system/jquery.form + - system/drupal.ajax +views.contextual-links: + title: 'Views Contextual links' + version: 8.0-dev + js: + - { data: js/views-contextual.js, group: -100, weight: -10 } + dependencies: + - system/jquery + - system/drupal diff --git a/core/modules/views/views.module b/core/modules/views/views.module index 9075033..36727e8 100644 --- a/core/modules/views/views.module +++ b/core/modules/views/views.module @@ -845,42 +845,6 @@ function views_hook_info() { } /** - * Implements hook_library_info(). - */ -function views_library_info() { - $path = drupal_get_path('module', 'views') . '/js'; - $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), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - array('system', 'jquery.form'), - array('system', 'drupal.ajax'), - ), - ); - $libraries['views.contextual-links'] = array( - 'title' => 'Views Contextual links', - 'version' => VERSION, - 'js' => array( - "$path/views-contextual.js" => array('group' => JS_LIBRARY, 'weight' => -10), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - ), - ); - - return $libraries; -} - -/** * Fetch a handler from the data cache. * * @param array $item diff --git a/core/modules/views_ui/views_ui.library.yml b/core/modules/views_ui/views_ui.library.yml new file mode 100644 index 0000000..949b1e0 --- /dev/null +++ b/core/modules/views_ui/views_ui.library.yml @@ -0,0 +1,14 @@ +views_ui.admin: + title: 'Views UI ADMIN' + version: 8.0-dev + js: + - { data: js/ajax.js, group: 0 } + - { data: js/views-admin.js, group: 0 } + dependencies: + - system/jquery + - system/drupal + - system/drupalSettings + - system/jquery.once + - system/jquery.form + - system/drupal.ajax + - views/views.ajax diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index f169fd0..9b261f8 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -191,35 +191,6 @@ function views_ui_permission() { } /** - * Implements hook_library_info(). - */ -function views_ui_library_info() { - $libraries = array(); - - $path = drupal_get_path('module', 'views_ui') . '/js/'; - - $libraries['views_ui.admin'] = array( - 'title' => 'Views UI ADMIN', - 'version' => VERSION, - 'js' => array( - $path . 'ajax.js' => array('group' => JS_DEFAULT), - $path . 'views-admin.js' => array('group' => JS_DEFAULT), - ), - 'dependencies' => array( - array('system', 'jquery'), - array('system', 'drupal'), - array('system', 'drupalSettings'), - array('system', 'jquery.once'), - array('system', 'jquery.form'), - array('system', 'drupal.ajax'), - array('views', 'views.ajax'), - ), - ); - - return $libraries; -} - -/** * Theme preprocess for views-view.tpl.php. */ function views_ui_preprocess_views_view(&$vars) {