diff --git a/core/modules/views/views_ui/js/views-admin.js b/core/modules/views/views_ui/js/views-admin.js index 2bc125c..9ef1230 100644 --- a/core/modules/views/views_ui/js/views-admin.js +++ b/core/modules/views/views_ui/js/views-admin.js @@ -111,8 +111,8 @@ Drupal.viewsUi.FormFieldFiller = function ($target, exclude, replace, suffix) { // one bound version of an object method, whereas we need one version per // object instance. var self = this; - this.populate = function () {return self._populate.call(self);}; - this.unbind = function () {return self._unbind.call(self);}; + this.populate = function() {return self._populate.call(self);}; + this.unbind = function() {return self._unbind.call(self);}; this.bind(); // Object constructor; no return value. @@ -194,7 +194,7 @@ Drupal.behaviors.addItemForm.attach = function (context) { } }; -Drupal.viewsUi.addItemForm = function($form) { +Drupal.viewsUi.addItemForm = function ($form) { "use strict"; @@ -238,7 +238,7 @@ Drupal.viewsUi.addItemForm.prototype.handleCheck = function (event) { /** * Refresh the display of the checked items. */ -Drupal.viewsUi.addItemForm.prototype.refreshCheckedItems = function() { +Drupal.viewsUi.addItemForm.prototype.refreshCheckedItems = function () { "use strict"; @@ -273,7 +273,7 @@ Drupal.behaviors.viewsUiRenderAddViewButton.attach = function (context) { // in an 'Add' dropdown. // @todo This assumes English, but so does $addDisplayDropdown above. Add // support for translation. - $displayButtons.each(function () { + $displayButtons.each(function() { var label = $(this).val(); if (label.substr(0, 4) === 'Add ') { $(this).val(label.substr(4)); @@ -352,7 +352,7 @@ Drupal.viewsUi.OptionsSearch = function ($form) { // Restripe on initial loading. this.handleKeyup(); // Trap the ENTER key in the search box so that it doesn't submit the form. - this.$searchBox.keypress(function(event) { + this.$searchBox.keypress(function (event) { if (event.which === 13) { event.preventDefault(); } @@ -847,26 +847,26 @@ Drupal.behaviors.viewsFilterConfigSelectAll = {}; /** * Add a select all checkbox, which checks each checkbox at once. */ -Drupal.behaviors.viewsFilterConfigSelectAll.attach = function(context) { +Drupal.behaviors.viewsFilterConfigSelectAll.attach = function (context) { "use strict"; var $ = jQuery; // Show the select all checkbox. - $('#views-ui-config-item-form div.form-item-options-value-all', context).once(function() { + $('#views-ui-config-item-form div.form-item-options-value-all', context).once(function () { $(this).show(); }) .find('input[type=checkbox]') - .click(function() { + .click(function () { var checked = $(this).is(':checked'); // Update all checkbox beside the select all checkbox. - $(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function() { + $(this).parents('.form-checkboxes').find('input[type=checkbox]').each(function () { $(this).attr('checked', checked); }); }); // Uncheck the select all checkbox if any of the others are unchecked. - $('#views-ui-config-item-form div.form-type-checkbox').not($('.form-item-options-value-all')).find('input[type=checkbox]').each(function() { - $(this).click(function() { + $('#views-ui-config-item-form div.form-type-checkbox').not($('.form-item-options-value-all')).find('input[type=checkbox]').each(function () { + $(this).click(function () { if ($(this).is('checked') === false) { $('#edit-options-value-all').removeAttr('checked'); } @@ -927,7 +927,7 @@ Drupal.behaviors.viewsUiChangeDefaultWidget.attach = function () { } } // Update on widget change. - $('input[name="options[group_info][multiple]"]').change(function() { + $('input[name="options[group_info][multiple]"]').change(function () { change_default_widget($(this).attr("checked")); }); // Update the first time the form is rendered. @@ -976,18 +976,18 @@ Drupal.behaviors.viewsUiOverrideSelect.attach = function (context) { "use strict"; var $ = jQuery; - $('#edit-override-dropdown', context).once('views-ui-override-button-text', function() { + $('#edit-override-dropdown', context).once('views-ui-override-button-text', function () { // Closures! :( var $submit = $('#edit-submit', context); var old_value = $submit.val(); $submit.once('views-ui-override-button-text') - .bind('mouseup', function() { + .bind('mouseup', function () { $(this).val(old_value); return true; }); - $(this).bind('change', function() { + $(this).bind('change', function () { if ($(this).val() === 'default') { $submit.val(Drupal.t('Apply (all displays)')); } @@ -1033,15 +1033,13 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) { minHeight = maxHeight; } - var height = 0; - // Calculate the height of the 'scroll' region. var scrollHeight = 0; scrollHeight += parseInt($scroll.css('padding-top'), 10); scrollHeight += parseInt($scroll.css('padding-bottom'), 10); - $scroll.children().each(function() { + $scroll.children().each(function () { var w = $(this).innerWidth(); if (w > width) { width = w; @@ -1097,7 +1095,7 @@ Drupal.viewsUi.resizeModal = function (e, no_shrink) { }; -jQuery(function() { +jQuery(function () { "use strict";