diff --git a/core/modules/book/book.libraries.yml b/core/modules/book/book.libraries.yml index bc0241f..6b1a538 100644 --- a/core/modules/book/book.libraries.yml +++ b/core/modules/book/book.libraries.yml @@ -1,7 +1,7 @@ drupal.book: version: VERSION js: - book.js: {} + js/book.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/book/book.js b/core/modules/book/js/book.js similarity index 100% rename from core/modules/book/book.js rename to core/modules/book/js/book.js diff --git a/core/modules/color/color.libraries.yml b/core/modules/color/color.libraries.yml index b2eb8d6..57656de 100644 --- a/core/modules/color/color.libraries.yml +++ b/core/modules/color/color.libraries.yml @@ -1,7 +1,7 @@ drupal.color: version: VERSION js: - color.js: {} + js/color.js: {} dependencies: - core/jquery - core/drupal @@ -12,7 +12,7 @@ drupal.color: drupal.color.preview: version: VERSION js: - preview.js: {} + js/preview.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/color/color.js b/core/modules/color/js/color.js similarity index 100% rename from core/modules/color/color.js rename to core/modules/color/js/color.js diff --git a/core/modules/color/preview.js b/core/modules/color/js/preview.js similarity index 100% rename from core/modules/color/preview.js rename to core/modules/color/js/preview.js diff --git a/core/modules/comment/comment.libraries.yml b/core/modules/comment/comment.libraries.yml index 78c4ff0..cff9f2e 100644 --- a/core/modules/comment/comment.libraries.yml +++ b/core/modules/comment/comment.libraries.yml @@ -1,7 +1,7 @@ drupal.comment: version: VERSION js: - comment-entity-form.js: {} + js/comment-entity-form.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/comment/comment-entity-form.js b/core/modules/comment/js/comment-entity-form.js similarity index 100% rename from core/modules/comment/comment-entity-form.js rename to core/modules/comment/js/comment-entity-form.js diff --git a/core/modules/content_translation/content_translation.libraries.yml b/core/modules/content_translation/content_translation.libraries.yml index 3dd1ce0..f7c761b 100644 --- a/core/modules/content_translation/content_translation.libraries.yml +++ b/core/modules/content_translation/content_translation.libraries.yml @@ -1,7 +1,7 @@ drupal.content_translation.admin: version: VERSION js: - content_translation.admin.js: {} + js/content_translation.admin.js: {} css: theme: css/content_translation.admin.css: {} diff --git a/core/modules/content_translation/content_translation.admin.js b/core/modules/content_translation/js/content_translation.admin.js similarity index 100% rename from core/modules/content_translation/content_translation.admin.js rename to core/modules/content_translation/js/content_translation.admin.js diff --git a/core/modules/field_ui/field_ui.libraries.yml b/core/modules/field_ui/field_ui.libraries.yml index 4add558..783aba7 100644 --- a/core/modules/field_ui/field_ui.libraries.yml +++ b/core/modules/field_ui/field_ui.libraries.yml @@ -1,7 +1,7 @@ drupal.field_ui: version: VERSION js: - field_ui.js: {} + js/field_ui.js: {} css: theme: css/field_ui.admin.css: {} diff --git a/core/modules/field_ui/field_ui.js b/core/modules/field_ui/js/field_ui.js similarity index 100% rename from core/modules/field_ui/field_ui.js rename to core/modules/field_ui/js/field_ui.js diff --git a/core/modules/file/file.libraries.yml b/core/modules/file/file.libraries.yml index ccc0c3b..fc8734c 100644 --- a/core/modules/file/file.libraries.yml +++ b/core/modules/file/file.libraries.yml @@ -1,7 +1,7 @@ drupal.file: version: VERSION js: - file.js: {} + js/file.js: {} css: theme: css/file.admin.css: {} diff --git a/core/modules/file/file.js b/core/modules/file/js/file.js similarity index 100% rename from core/modules/file/file.js rename to core/modules/file/js/file.js diff --git a/core/modules/filter/filter.libraries.yml b/core/modules/filter/filter.libraries.yml index 91aea0b..3a25dd7 100644 --- a/core/modules/filter/filter.libraries.yml +++ b/core/modules/filter/filter.libraries.yml @@ -1,7 +1,7 @@ drupal.filter.admin: version: VERSION js: - filter.admin.js: {} + js/filter.admin.js: {} css: theme: css/filter.admin.css: {} @@ -14,7 +14,7 @@ drupal.filter.admin: drupal.filter.filter_html.admin: version: VERSION js: - filter.filter_html.admin.js: {} + js/filter.filter_html.admin.js: {} dependencies: - core/jquery - core/jquery.once @@ -23,7 +23,7 @@ drupal.filter.filter_html.admin: drupal.filter: version: VERSION js: - filter.js: {} + js/filter.js: {} css: theme: # @todo Misnomer: Does not contain administrative styles. diff --git a/core/modules/filter/filter.admin.js b/core/modules/filter/js/filter.admin.js similarity index 100% rename from core/modules/filter/filter.admin.js rename to core/modules/filter/js/filter.admin.js diff --git a/core/modules/filter/filter.filter_html.admin.js b/core/modules/filter/js/filter.filter_html.admin.js similarity index 100% rename from core/modules/filter/filter.filter_html.admin.js rename to core/modules/filter/js/filter.filter_html.admin.js diff --git a/core/modules/filter/filter.js b/core/modules/filter/js/filter.js similarity index 100% rename from core/modules/filter/filter.js rename to core/modules/filter/js/filter.js diff --git a/core/modules/language/language.admin.js b/core/modules/language/js/language.admin.js similarity index 100% rename from core/modules/language/language.admin.js rename to core/modules/language/js/language.admin.js diff --git a/core/modules/language/language.libraries.yml b/core/modules/language/language.libraries.yml index 0c4cc8c..c2cef78 100644 --- a/core/modules/language/language.libraries.yml +++ b/core/modules/language/language.libraries.yml @@ -1,7 +1,7 @@ drupal.language.admin: version: VERSION js: - language.admin.js: {} + js/language.admin.js: {} css: theme: css/language.admin.css: {} diff --git a/core/modules/locale/locale.admin.js b/core/modules/locale/js/locale.admin.js similarity index 100% rename from core/modules/locale/locale.admin.js rename to core/modules/locale/js/locale.admin.js diff --git a/core/modules/locale/locale.bulk.js b/core/modules/locale/js/locale.bulk.js similarity index 100% rename from core/modules/locale/locale.bulk.js rename to core/modules/locale/js/locale.bulk.js diff --git a/core/modules/locale/locale.datepicker.js b/core/modules/locale/js/locale.datepicker.js similarity index 100% rename from core/modules/locale/locale.datepicker.js rename to core/modules/locale/js/locale.datepicker.js diff --git a/core/modules/locale/locale.libraries.yml b/core/modules/locale/locale.libraries.yml index 9711d01..0dc3140 100644 --- a/core/modules/locale/locale.libraries.yml +++ b/core/modules/locale/locale.libraries.yml @@ -1,7 +1,7 @@ drupal.locale.admin: version: VERSION js: - locale.admin.js: {} + js/locale.admin.js: {} css: component: css/locale.admin.css: {} @@ -14,7 +14,7 @@ drupal.locale.admin: drupal.locale.datepicker: version: VERSION js: - locale.datepicker.js: {} + js/locale.datepicker.js: {} dependencies: - core/jquery - core/drupal @@ -27,4 +27,4 @@ translations: # This file does not actually exist; it's a placeholder file that will be # overriden by locale_js_alter(), to use the file that contains the actual # translations, for the language used in the current request. - locale.translation.js: {} + js/locale.translation.js: {} diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 74b76ec..397b23a 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -490,7 +490,7 @@ function locale_js_alter(&$javascript, AttachedAssetsInterface $assets) { foreach ($javascript as $item) { if (isset($item['type']) && $item['type'] == 'file') { // Ignore the JS translation placeholder file. - if ($item['data'] === 'core/modules/locale/locale.translation.js') { + if ($item['data'] === 'core/modules/locale/js/locale.translation.js') { continue; } $files[] = $item['data']; @@ -498,7 +498,7 @@ function locale_js_alter(&$javascript, AttachedAssetsInterface $assets) { } // Replace the placeholder file with the actual JS translation file. - $placeholder_file = 'core/modules/locale/locale.translation.js'; + $placeholder_file = 'core/modules/locale/js/locale.translation.js'; if (isset($javascript[$placeholder_file])) { if ($translation_file = locale_js_translate($files)) { $js_translation_asset = &$javascript[$placeholder_file]; diff --git a/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php b/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php index 0e62805..57d83ce 100644 --- a/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php +++ b/core/modules/locale/src/Tests/LocaleJavascriptTranslationTest.php @@ -26,7 +26,7 @@ class LocaleJavascriptTranslationTest extends WebTestBase { public static $modules = array('locale', 'locale_test'); public function testFileParsing() { - $filename = __DIR__ . '/../../tests/locale_test.js'; + $filename = __DIR__ . '/../../tests/js/locale_test.js'; // Parse the file to look for source strings. _locale_parse_js_file($filename); @@ -131,7 +131,7 @@ public function testLocaleTranslationJsDependencies() { ->getStrings(array( 'source' => 'Show description', 'type' => 'javascript', - 'name' => 'core/modules/locale/locale.admin.js', + 'name' => 'core/modules/locale/js/locale.admin.js', )); $string = $strings[0]; diff --git a/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php b/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php index 682af83..4f2b62d 100644 --- a/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php +++ b/core/modules/locale/src/Tests/LocaleLibraryAlterTest.php @@ -34,6 +34,6 @@ public function testLibraryAlter() { $assets = new AttachedAssets(); $assets->setLibraries(['core/jquery.ui.datepicker']); $js_assets = $this->container->get('asset.resolver')->getJsAssets($assets, FALSE)[1]; - $this->assertTrue(array_key_exists('core/modules/locale/locale.datepicker.js', $js_assets), 'locale.datepicker.js added to scripts.'); + $this->assertTrue(array_key_exists('core/modules/locale/js/locale.datepicker.js', $js_assets), 'locale.datepicker.js added to scripts.'); } } diff --git a/core/modules/locale/tests/locale_test.js b/core/modules/locale/tests/js/locale_test.js similarity index 100% rename from core/modules/locale/tests/locale_test.js rename to core/modules/locale/tests/js/locale_test.js diff --git a/core/modules/menu_ui/menu_ui.admin.js b/core/modules/menu_ui/js/menu_ui.admin.js similarity index 100% rename from core/modules/menu_ui/menu_ui.admin.js rename to core/modules/menu_ui/js/menu_ui.admin.js diff --git a/core/modules/menu_ui/menu_ui.js b/core/modules/menu_ui/js/menu_ui.js similarity index 100% rename from core/modules/menu_ui/menu_ui.js rename to core/modules/menu_ui/js/menu_ui.js diff --git a/core/modules/menu_ui/menu_ui.libraries.yml b/core/modules/menu_ui/menu_ui.libraries.yml index c5f9594..544ae9b 100644 --- a/core/modules/menu_ui/menu_ui.libraries.yml +++ b/core/modules/menu_ui/menu_ui.libraries.yml @@ -1,7 +1,7 @@ drupal.menu_ui: version: VERSION js: - menu_ui.js: {} + js/menu_ui.js: {} dependencies: - core/jquery - core/drupal @@ -10,7 +10,7 @@ drupal.menu_ui: drupal.menu_ui.admin: version: VERSION js: - menu_ui.admin.js: {} + js/menu_ui.admin.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/node/content_types.js b/core/modules/node/js/content_types.js similarity index 100% rename from core/modules/node/content_types.js rename to core/modules/node/js/content_types.js diff --git a/core/modules/node/node.js b/core/modules/node/js/node.js similarity index 100% rename from core/modules/node/node.js rename to core/modules/node/js/node.js diff --git a/core/modules/node/node.preview.js b/core/modules/node/js/node.preview.js similarity index 100% rename from core/modules/node/node.preview.js rename to core/modules/node/js/node.preview.js diff --git a/core/modules/node/node.libraries.yml b/core/modules/node/node.libraries.yml index 22c93ac..e89ebd4 100644 --- a/core/modules/node/node.libraries.yml +++ b/core/modules/node/node.libraries.yml @@ -4,7 +4,7 @@ drupal.node: layout: css/node.module.css: {} js: - node.js: {} + js/node.js: {} dependencies: - core/jquery - core/drupal @@ -17,7 +17,7 @@ drupal.node.preview: theme: css/node.preview.css: {} js: - node.preview.js: {} + js/node.preview.js: {} dependencies: - core/jquery - core/jquery.once @@ -27,7 +27,7 @@ drupal.node.preview: drupal.content_types: version: VERSION js: - content_types.js: {} + js/content_types.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/path/path.js b/core/modules/path/js/path.js similarity index 100% rename from core/modules/path/path.js rename to core/modules/path/js/path.js diff --git a/core/modules/path/path.libraries.yml b/core/modules/path/path.libraries.yml index 2ce29a5..69170f2 100644 --- a/core/modules/path/path.libraries.yml +++ b/core/modules/path/path.libraries.yml @@ -1,7 +1,7 @@ drupal.path: version: VERSION js: - path.js: {} + js/path.js: {} dependencies: - core/jquery - core/drupal diff --git a/core/modules/simpletest/simpletest.js b/core/modules/simpletest/js/simpletest.js similarity index 100% rename from core/modules/simpletest/simpletest.js rename to core/modules/simpletest/js/simpletest.js diff --git a/core/modules/simpletest/simpletest.libraries.yml b/core/modules/simpletest/simpletest.libraries.yml index 7bcbc07..7c6e714 100644 --- a/core/modules/simpletest/simpletest.libraries.yml +++ b/core/modules/simpletest/simpletest.libraries.yml @@ -1,7 +1,7 @@ drupal.simpletest: version: VERSION js: - simpletest.js: {} + js/simpletest.js: {} css: component: css/simpletest.module.css: {} diff --git a/core/modules/simpletest/simpletest.module b/core/modules/simpletest/simpletest.module index ddd6828..3f39f52 100644 --- a/core/modules/simpletest/simpletest.module +++ b/core/modules/simpletest/simpletest.module @@ -53,7 +53,7 @@ function simpletest_theme() { function simpletest_js_alter(&$javascript, AttachedAssetsInterface $assets) { // Since SimpleTest is a special use case for the table select, stick the // SimpleTest JavaScript above the table select. - $simpletest = drupal_get_path('module', 'simpletest') . '/simpletest.js'; + $simpletest = drupal_get_path('module', 'simpletest') . '/js/simpletest.js'; if (array_key_exists($simpletest, $javascript) && array_key_exists('core/misc/tableselect.js', $javascript)) { $javascript[$simpletest]['weight'] = $javascript['core/misc/tableselect.js']['weight'] - 1; } diff --git a/core/modules/statistics/statistics.js b/core/modules/statistics/js/statistics.js similarity index 100% rename from core/modules/statistics/statistics.js rename to core/modules/statistics/js/statistics.js diff --git a/core/modules/statistics/src/Tests/StatisticsAttachedTest.php b/core/modules/statistics/src/Tests/StatisticsAttachedTest.php index 48194ff..14f9f9d 100644 --- a/core/modules/statistics/src/Tests/StatisticsAttachedTest.php +++ b/core/modules/statistics/src/Tests/StatisticsAttachedTest.php @@ -56,7 +56,7 @@ public function testAttached() { $node->save(); $this->drupalGet('node/' . $node->id()); - $this->assertRaw('core/modules/statistics/statistics.js', 'Statistics library is available'); + $this->assertRaw('core/modules/statistics/js/statistics.js', 'Statistics library is available'); } } diff --git a/core/modules/statistics/src/Tests/StatisticsLoggingTest.php b/core/modules/statistics/src/Tests/StatisticsLoggingTest.php index 7f15574..e42d4e4 100644 --- a/core/modules/statistics/src/Tests/StatisticsLoggingTest.php +++ b/core/modules/statistics/src/Tests/StatisticsLoggingTest.php @@ -99,7 +99,7 @@ function testLogging() { $path = 'node/' . $this->node->id(); $module_path = drupal_get_path('module', 'statistics'); $stats_path = base_path() . $module_path . '/statistics.php'; - $lib_path = base_path() . $module_path . '/statistics.js'; + $lib_path = base_path() . $module_path . '/js/statistics.js'; $expected_library = '/