diff --git a/core/misc/ajax.js b/core/misc/ajax.js index c35241c..8561462 100644 --- a/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Provides Ajax page updating via jQuery $.ajax (Asynchronous JavaScript and XML). * diff --git a/core/misc/authorize.js b/core/misc/authorize.js index d522a5b..aa4575d 100644 --- a/core/misc/authorize.js +++ b/core/misc/authorize.js @@ -1,4 +1,3 @@ - /** * @file * Conditionally hide or show the appropriate settings and saved defaults @@ -7,6 +6,8 @@ (function ($) { +"use strict"; + Drupal.behaviors.authorizeFileTransferForm = { attach: function(context) { $('#edit-connection-settings-authorize-filetransfer-default').change(function() { diff --git a/core/misc/autocomplete.js b/core/misc/autocomplete.js index a4f6335..8b0dd72 100644 --- a/core/misc/autocomplete.js +++ b/core/misc/autocomplete.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Attaches the autocomplete behavior to all required fields. */ diff --git a/core/misc/batch.js b/core/misc/batch.js index 6d28b69..b83776d 100644 --- a/core/misc/batch.js +++ b/core/misc/batch.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Attaches the batch behavior to progress bars. */ diff --git a/core/misc/collapse.js b/core/misc/collapse.js index 28281a1..109ac59 100644 --- a/core/misc/collapse.js +++ b/core/misc/collapse.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Toggle the visibility of a fieldset using smooth animations. */ @@ -58,7 +60,7 @@ Drupal.behaviors.collapse = { $(context).find('fieldset.collapsible').once('collapse', function () { var $fieldset = $(this); // Expand fieldset if there are errors inside, or if it contains an - // element that is targeted by the uri fragment identifier. + // element that is targeted by the uri fragment identifier. var anchor = location.hash && location.hash != '#' ? ', ' + location.hash : ''; if ($fieldset.find('.error' + anchor).length) { $fieldset.removeClass('collapsed'); diff --git a/core/misc/drupal.js b/core/misc/drupal.js index c7917b0..9196475 100644 --- a/core/misc/drupal.js +++ b/core/misc/drupal.js @@ -5,6 +5,8 @@ jQuery.noConflict(); (function ($) { +"use strict"; + /** * Attach all registered behaviors to a page element. * diff --git a/core/misc/form.js b/core/misc/form.js index 4dc5b8c..0e7cf7b 100644 --- a/core/misc/form.js +++ b/core/misc/form.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Retrieves the summary for the first element. */ diff --git a/core/misc/machine-name.js b/core/misc/machine-name.js index ffe774f..3cb7351 100644 --- a/core/misc/machine-name.js +++ b/core/misc/machine-name.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Attach the machine-readable name form element behavior. */ diff --git a/core/misc/progress.js b/core/misc/progress.js index b0e125c..343b9ad 100644 --- a/core/misc/progress.js +++ b/core/misc/progress.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * A progressbar object. Initialized with the given id. Must be inserted into * the DOM afterwards through progressBar.element. diff --git a/core/misc/states.js b/core/misc/states.js index 30b63ba..65ee9da 100644 --- a/core/misc/states.js +++ b/core/misc/states.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * The base States namespace. * diff --git a/core/misc/tabledrag.js b/core/misc/tabledrag.js index 16800e0..273dcc1 100644 --- a/core/misc/tabledrag.js +++ b/core/misc/tabledrag.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Drag and drop table rows with field manipulation. * diff --git a/core/misc/tableheader.js b/core/misc/tableheader.js index aa1c8bb..225cb73 100644 --- a/core/misc/tableheader.js +++ b/core/misc/tableheader.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Attaches sticky table headers. */ diff --git a/core/misc/tableselect.js b/core/misc/tableselect.js index b7011e0..2bf708e 100644 --- a/core/misc/tableselect.js +++ b/core/misc/tableselect.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + Drupal.behaviors.tableSelect = { attach: function (context, settings) { // Select the inner-most table in case of nested tables. diff --git a/core/misc/timezone.js b/core/misc/timezone.js index 62b7d4b..787cfcf 100644 --- a/core/misc/timezone.js +++ b/core/misc/timezone.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Set the client's system time zone as default values of form fields. */ diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js index 65e5683..baae1d1 100644 --- a/core/misc/vertical-tabs.js +++ b/core/misc/vertical-tabs.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * This script transforms a set of fieldsets into a stack of vertical * tabs. Another tab pane can be selected by clicking on the respective diff --git a/core/modules/block/block.js b/core/modules/block/block.js index dabb570..e200017 100644 --- a/core/modules/block/block.js +++ b/core/modules/block/block.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Provide the summary information for the block settings vertical tabs. */ diff --git a/core/modules/book/book.js b/core/modules/book/book.js index e6ab4fa..b7a6713 100644 --- a/core/modules/book/book.js +++ b/core/modules/book/book.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + Drupal.behaviors.bookFieldsetSummaries = { attach: function (context) { $(context).find('fieldset.book-outline-form').drupalSetSummary(function (context) { diff --git a/core/modules/color/color.js b/core/modules/color/color.js index d833a4b..31c526e 100644 --- a/core/modules/color/color.js +++ b/core/modules/color/color.js @@ -5,6 +5,8 @@ (function ($) { +"use strict"; + Drupal.behaviors.color = { attach: function (context, settings) { var i, j, colors, field_name; diff --git a/core/modules/color/preview.js b/core/modules/color/preview.js index 69c3897..9e19985 100644 --- a/core/modules/color/preview.js +++ b/core/modules/color/preview.js @@ -4,6 +4,9 @@ */ (function ($) { + + "use strict"; + Drupal.color = { callback: function(context, settings, form, farb, height, width) { // Solid background. diff --git a/core/modules/comment/comment-node-form.js b/core/modules/comment/comment-node-form.js index 51ea492..0249d96 100644 --- a/core/modules/comment/comment-node-form.js +++ b/core/modules/comment/comment-node-form.js @@ -5,6 +5,8 @@ (function ($) { +"use strict"; + Drupal.behaviors.commentFieldsetSummaries = { attach: function (context) { var $context = $(context); diff --git a/core/modules/contextual/contextual.js b/core/modules/contextual/contextual.js index 1c3305f..c8cc0e4 100644 --- a/core/modules/contextual/contextual.js +++ b/core/modules/contextual/contextual.js @@ -5,6 +5,8 @@ (function ($) { +"use strict"; + Drupal.contextualLinks = Drupal.contextualLinks || {}; /** diff --git a/core/modules/dashboard/dashboard.js b/core/modules/dashboard/dashboard.js index 39d87c2..e1a43e0 100644 --- a/core/modules/dashboard/dashboard.js +++ b/core/modules/dashboard/dashboard.js @@ -5,6 +5,8 @@ (function ($) { +"use strict"; + /** * Implements Drupal.behaviors for the Dashboard module. */ diff --git a/core/modules/field/modules/text/text.js b/core/modules/field/modules/text/text.js index 8527355..be6aa49 100644 --- a/core/modules/field/modules/text/text.js +++ b/core/modules/field/modules/text/text.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Auto-hide summary textarea if empty and show hide and unhide links. */ diff --git a/core/modules/field_ui/field_ui.js b/core/modules/field_ui/field_ui.js index 6de5c15..7cdfacc 100644 --- a/core/modules/field_ui/field_ui.js +++ b/core/modules/field_ui/field_ui.js @@ -2,9 +2,11 @@ * @file * Attaches the behaviors for the Field UI module. */ - + (function($) { +"use strict"; + Drupal.behaviors.fieldUIFieldOverview = { attach: function (context, settings) { $(context).find('table#field-overview').once('field-overview', function () { diff --git a/core/modules/file/file.js b/core/modules/file/file.js index a934afe..cec3fe8 100644 --- a/core/modules/file/file.js +++ b/core/modules/file/file.js @@ -9,6 +9,8 @@ (function ($) { +"use strict"; + /** * Attach behaviors to managed file element upload fields. */ diff --git a/core/modules/filter/filter.admin.js b/core/modules/filter/filter.admin.js index 43cda26..b002041 100644 --- a/core/modules/filter/filter.admin.js +++ b/core/modules/filter/filter.admin.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + Drupal.behaviors.filterStatus = { attach: function (context, settings) { var $context = $(context); diff --git a/core/modules/filter/filter.js b/core/modules/filter/filter.js index db5f42a..9482737 100644 --- a/core/modules/filter/filter.js +++ b/core/modules/filter/filter.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Automatically display the guidelines of the selected text format. */ diff --git a/core/modules/locale/locale.datepicker.js b/core/modules/locale/locale.datepicker.js index 81f1e17..024c1e2 100644 --- a/core/modules/locale/locale.datepicker.js +++ b/core/modules/locale/locale.datepicker.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + $.datepicker.regional['drupal-locale'] = { closeText: Drupal.t('Done'), prevText: Drupal.t('Prev'), diff --git a/core/modules/menu/menu.admin.js b/core/modules/menu/menu.admin.js index 4e5bf07..9eda4da 100644 --- a/core/modules/menu/menu.admin.js +++ b/core/modules/menu/menu.admin.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + Drupal.behaviors.menuChangeParentItems = { attach: function (context, settings) { $('fieldset#edit-menu input').each(function () { diff --git a/core/modules/menu/menu.js b/core/modules/menu/menu.js index f315e7a..f3bfb1c 100644 --- a/core/modules/menu/menu.js +++ b/core/modules/menu/menu.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + Drupal.behaviors.menuFieldsetSummaries = { attach: function (context) { $(context).find('fieldset.menu-link-form').drupalSetSummary(function (context) { diff --git a/core/modules/node/content_types.js b/core/modules/node/content_types.js index 43cfa37..5c1c44e 100644 --- a/core/modules/node/content_types.js +++ b/core/modules/node/content_types.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + Drupal.behaviors.contentTypes = { attach: function (context) { var $context = $(context); diff --git a/core/modules/node/node.js b/core/modules/node/node.js index 8990164..0899d3c 100644 --- a/core/modules/node/node.js +++ b/core/modules/node/node.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + Drupal.behaviors.nodeFieldsetSummaries = { attach: function (context) { var $context = $(context); diff --git a/core/modules/openid/openid.js b/core/modules/openid/openid.js index 754efb1..53a0cb3 100644 --- a/core/modules/openid/openid.js +++ b/core/modules/openid/openid.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + Drupal.behaviors.openid = { attach: function (context) { var $context = $(context); diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js index ff111d8..29a9790 100644 --- a/core/modules/overlay/overlay-child.js +++ b/core/modules/overlay/overlay-child.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Attach the child dialog behavior to new content. */ diff --git a/core/modules/overlay/overlay-parent.js b/core/modules/overlay/overlay-parent.js index 19d2d64..e20682a 100644 --- a/core/modules/overlay/overlay-parent.js +++ b/core/modules/overlay/overlay-parent.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Open the overlay, or load content into it, when an admin link is clicked. */ diff --git a/core/modules/path/path.js b/core/modules/path/path.js index b20378e..41b6e8f 100644 --- a/core/modules/path/path.js +++ b/core/modules/path/path.js @@ -4,6 +4,8 @@ */ (function ($) { +"use strict"; + Drupal.behaviors.pathFieldsetSummaries = { attach: function (context) { $(context).find('fieldset.path-form').drupalSetSummary(function (context) { diff --git a/core/modules/shortcut/shortcut.admin.js b/core/modules/shortcut/shortcut.admin.js index 2647f34..4530df5 100644 --- a/core/modules/shortcut/shortcut.admin.js +++ b/core/modules/shortcut/shortcut.admin.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Handle the concept of a fixed number of slots. * diff --git a/core/modules/system/system.cron.js b/core/modules/system/system.cron.js index af17dab..a35a914 100644 --- a/core/modules/system/system.cron.js +++ b/core/modules/system/system.cron.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Checks to see if the cron should be automatically run. */ diff --git a/core/modules/system/system.js b/core/modules/system/system.js index 98da1a6..8e22e4e 100644 --- a/core/modules/system/system.js +++ b/core/modules/system/system.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Show/hide the 'Email site administrator when updates are available' checkbox * on the install page. diff --git a/core/modules/taxonomy/taxonomy.js b/core/modules/taxonomy/taxonomy.js index 035dc29..0fe6e9a 100644 --- a/core/modules/taxonomy/taxonomy.js +++ b/core/modules/taxonomy/taxonomy.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Move a block in the blocks table from one region to another via select list. * diff --git a/core/modules/toolbar/toolbar.js b/core/modules/toolbar/toolbar.js index d345284..ee8bddb 100644 --- a/core/modules/toolbar/toolbar.js +++ b/core/modules/toolbar/toolbar.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + Drupal.toolbar = Drupal.toolbar || {}; /** diff --git a/core/modules/user/user.js b/core/modules/user/user.js index 59a178e..147c4c2 100644 --- a/core/modules/user/user.js +++ b/core/modules/user/user.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Attach handlers to evaluate the strength of any password fields and to check * that its confirmation is correct. @@ -157,6 +159,7 @@ Drupal.evaluatePasswordStrength = function (password, translate) { strength = 5; } + var indicatorText; // Based on the strength, work out what text should be shown by the password strength meter. if (strength < 60) { indicatorText = translate.weak; diff --git a/core/modules/user/user.permissions.js b/core/modules/user/user.permissions.js index 896c936..4b6d4c9 100644 --- a/core/modules/user/user.permissions.js +++ b/core/modules/user/user.permissions.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Shows checked and disabled checkboxes for inherited permissions. */ diff --git a/core/themes/bartik/color/preview.js b/core/themes/bartik/color/preview.js index aeb4171..531deec 100644 --- a/core/themes/bartik/color/preview.js +++ b/core/themes/bartik/color/preview.js @@ -2,8 +2,10 @@ * @file * Preview for the Bartik theme. */ - (function ($) { + + "use strict"; + Drupal.color = { logoChanged: false, callback: function(context, settings, form, farb, height, width) {