Index: misc/vertical-tabs.js =================================================================== RCS file: /cvs/drupal/drupal/misc/vertical-tabs.js,v retrieving revision 1.8 diff -u -p -r1.8 vertical-tabs.js --- misc/vertical-tabs.js 5 Mar 2010 13:32:09 -0000 1.8 +++ misc/vertical-tabs.js 13 Mar 2010 21:28:54 -0000 @@ -73,7 +73,9 @@ Drupal.verticalTab = function (settings) }; Drupal.verticalTab.prototype = { - // Displays the tab's content pane. + /** + * Displays the tab's content pane. + */ focus: function () { this.fieldset .siblings('fieldset.vertical-tabs-pane') @@ -89,9 +91,50 @@ Drupal.verticalTab.prototype = { this.item.addClass('selected'); }, - // Updates the tab's summary. + /** + * Updates the tab's summary. + */ updateSummary: function () { this.summary.html(this.fieldset.getSummary()); + }, + + /** + * Shows a vertical tab pane. + */ + tabShow: function () { + // Display the tab. + this.item.show(); + // Update .first marker for items. We need recurse from parent to retain the + // actual DOM element order as jQuery implements sortOrder, but not as public + // method. + this.item.parent().children('.vertical-tab-button').removeClass('first') + .filter(':visible:first').addClass('first'); + // Display the fieldset. + this.fieldset.removeClass('vertical-tab-hidden').show(); + // Focus this tab. + this.focus(); + return this; + }, + + /** + * Hides a vertical tab pane. + */ + tabHide: function () { + // Hide this tab. + this.item.hide(); + // Update .first marker for items. We need recurse from parent to retain the + // actual DOM element order as jQuery implements sortOrder, but not as public + // method. + this.item.parent().children('.vertical-tab-button').removeClass('first') + .filter(':visible:first').addClass('first'); + // Hide the fieldset. + this.fieldset.addClass('vertical-tab-hidden').hide(); + // Focus the first visible tab (if there is one). + var $firstTab = this.fieldset.siblings('.vertical-tabs-pane:not(.vertical-tab-hidden):first'); + if ($firstTab.length) { + $firstTab.data('verticalTab').focus(); + } + return this; } }; Index: modules/filter/filter.admin.js =================================================================== RCS file: /cvs/drupal/drupal/modules/filter/filter.admin.js,v retrieving revision 1.2 diff -u -p -r1.2 filter.admin.js --- modules/filter/filter.admin.js 12 Mar 2010 22:31:37 -0000 1.2 +++ modules/filter/filter.admin.js 13 Mar 2010 21:24:11 -0000 @@ -1,46 +1,6 @@ // $Id: filter.admin.js,v 1.2 2010/03/12 22:31:37 webchick Exp $ - (function ($) { -/** - * Shows the vertical tab pane. - */ -Drupal.verticalTab.prototype.tabShow = function () { - // Display the tab. - this.item.show(); - // Update .first marker for items. We need recurse from parent to retain the - // actual DOM element order as jQuery implements sortOrder, but not as public - // method. - this.item.parent().children('.vertical-tab-button').removeClass('first') - .filter(':visible:first').addClass('first'); - // Display the fieldset. - this.fieldset.removeClass('filter-settings-hidden').show(); - // Focus this tab. - this.focus(); - return this; -}; - -/** - * Hides the vertical tab pane. - */ -Drupal.verticalTab.prototype.tabHide = function () { - // Hide this tab. - this.item.hide(); - // Update .first marker for items. We need recurse from parent to retain the - // actual DOM element order as jQuery implements sortOrder, but not as public - // method. - this.item.parent().children('.vertical-tab-button').removeClass('first') - .filter(':visible:first').addClass('first'); - // Hide the fieldset. - this.fieldset.addClass('filter-settings-hidden').hide(); - // Focus the first visible tab (if there is one). - var $firstTab = this.fieldset.siblings('.vertical-tabs-pane:not(.filter-settings-hidden):first'); - if ($firstTab.length) { - $firstTab.data('verticalTab').focus(); - } - return this; -}; - Drupal.behaviors.filterStatus = { attach: function (context, settings) { $('#filters-status-wrapper input.form-checkbox', context).once('filter-status', function () {