diff --git a/core/misc/ajax.js b/core/misc/ajax.js index 652b8e2..6bb10d9 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..e7858d6 100644 --- a/core/misc/authorize.js +++ b/core/misc/authorize.js @@ -7,6 +7,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 122f05d..8945c70 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 fee71a5..0e2cb1c 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 1a98dc0..408152c 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. */ diff --git a/core/misc/drupal.js b/core/misc/drupal.js index 83b0884..ca132ff 100644 --- a/core/misc/drupal.js +++ b/core/misc/drupal.js @@ -6,6 +6,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 259b84e..8c5d2ec 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 ced8c4b..bbdba31 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 822666a..0d3aab1 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 3c17efc..9b15fd4 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 da10a0e..d756f49 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 543862c..de552e7 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 fee63a9..57ddc74 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 5449730..27bc4e7 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 14d0660..25caf0c 100644 --- a/core/misc/vertical-tabs.js +++ b/core/misc/vertical-tabs.js @@ -1,6 +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 72b5673..70a185f 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. */ @@ -83,7 +85,7 @@ Drupal.behaviors.blockDrag = { // Add a handler so when a row is dropped, update fields dropped into new regions. tableDrag.onDrop = function () { - dragObject = this; + var dragObject = this; // Use "region-message" row instead of "region" row because // "region-{region_name}-message" is less prone to regexp match errors. var regionRow = $(dragObject.rowObject.element).prevAll('tr.region-message').get(0); diff --git a/core/modules/book/book.js b/core/modules/book/book.js index 075f33b..2bd0fd3 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) { $('fieldset.book-outline-form', context).drupalSetSummary(function (context) { diff --git a/core/modules/color/color.js b/core/modules/color/color.js index ae0019e..8bc624c 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 67eef0b..f3461aa 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 e46f05e..1a84c0a 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) { $('fieldset.comment-node-settings-form', context).drupalSetSummary(function (context) { diff --git a/core/modules/contextual/contextual.js b/core/modules/contextual/contextual.js index 2744acb..a780b3c 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 ca2a3b5..8bf691b 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 f3ae894..334fe73 100644 --- a/core/modules/field/modules/text/text.js +++ b/core/modules/field/modules/text/text.js @@ -1,6 +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 7359595..3746f8b 100644 --- a/core/modules/field_ui/field_ui.js +++ b/core/modules/field_ui/field_ui.js @@ -5,6 +5,8 @@ (function($) { +"use strict"; + Drupal.behaviors.fieldUIFieldOverview = { attach: function (context, settings) { $('table#field-overview', context).once('field-overview', function () { @@ -174,7 +176,7 @@ Drupal.fieldUIOverview = { if (region != rowHandler.region) { // Let the row handler deal with the region change. - refreshRows = rowHandler.regionChange(region); + var refreshRows = rowHandler.regionChange(region); // Update the row region. rowHandler.region = region; // Ajax-update the rows. diff --git a/core/modules/file/file.js b/core/modules/file/file.js index 8113170..416cfc7 100644 --- a/core/modules/file/file.js +++ b/core/modules/file/file.js @@ -10,6 +10,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 3bc6233..6e3084f 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) { $('#filters-status-wrapper input.form-checkbox', context).once('filter-status', function () { diff --git a/core/modules/filter/filter.js b/core/modules/filter/filter.js index c286159..d7c6ce1 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 4fa094e..690ba4a 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 ff4ef1e..f7a2d1c 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) { $('fieldset.menu-link-form', context).drupalSetSummary(function (context) { diff --git a/core/modules/node/content_types.js b/core/modules/node/content_types.js index 0031c32..3da11f9 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) { // Provide the vertical tab summaries. diff --git a/core/modules/node/node.js b/core/modules/node/node.js index ebf68eb..fcc4cef 100644 --- a/core/modules/node/node.js +++ b/core/modules/node/node.js @@ -1,6 +1,7 @@ - (function ($) { +"use strict"; + Drupal.behaviors.nodeFieldsetSummaries = { attach: function (context) { $('fieldset.node-form-revision-information', context).drupalSetSummary(function (context) { diff --git a/core/modules/openid/openid.js b/core/modules/openid/openid.js index 4a09e5a..0cf162c 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 loginElements = $('.form-item-name, .form-item-pass, li.openid-link'); diff --git a/core/modules/overlay/overlay-child.js b/core/modules/overlay/overlay-child.js index e78e383..cc387db 100644 --- a/core/modules/overlay/overlay-child.js +++ b/core/modules/overlay/overlay-child.js @@ -1,6 +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 2e3b4f9..ff2f512 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 fcc0acc..9fc821b 100644 --- a/core/modules/path/path.js +++ b/core/modules/path/path.js @@ -1,6 +1,8 @@ (function ($) { +"use strict"; + Drupal.behaviors.pathFieldsetSummaries = { attach: function (context) { $('fieldset.path-form', context).drupalSetSummary(function (context) { diff --git a/core/modules/shortcut/shortcut.admin.js b/core/modules/shortcut/shortcut.admin.js index 5554e5a..7d552c9 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/simpletest/simpletest.js b/core/modules/simpletest/simpletest.js index 9cab261..23cb2e4 100644 --- a/core/modules/simpletest/simpletest.js +++ b/core/modules/simpletest/simpletest.js @@ -1,5 +1,7 @@ (function ($) { +"use strict"; + /** * Add the cool table collapsing on the testing overview page. */ @@ -8,7 +10,7 @@ Drupal.behaviors.simpleTestMenuCollapse = { var timeout = null; // Adds expand-collapse functionality. $('div.simpletest-image').each(function () { - direction = settings.simpleTest[$(this).attr('id')].imageDirection; + var direction = settings.simpleTest[$(this).attr('id')].imageDirection; $(this).html(settings.simpleTest.images[direction]); }); 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 f4bdc6d..732f671 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 1a0c790..6cf206a 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 d50f205..b0c502e 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 042668d..0acd5cc 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. @@ -155,6 +157,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 988820e..fb81830 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 b40bcf7..423ea68 100644 --- a/core/themes/bartik/color/preview.js +++ b/core/themes/bartik/color/preview.js @@ -1,5 +1,7 @@ - (function ($) { + + "use strict"; + Drupal.color = { logoChanged: false, callback: function(context, settings, form, farb, height, width) {