Issue #2067323 by geerlingguy, jessebeach: Fixed Don't show empty vertical tabs area if all vertical tabs are hidden.

8.0.x
Alex Pott 2013-08-29 01:18:25 +01:00
parent 358de91aee
commit dda8d4d3f9
1 changed files with 6 additions and 0 deletions

View File

@ -148,6 +148,8 @@ Drupal.verticalTab.prototype = {
tabShow: function () {
// Display the tab.
this.item.show();
// Show the vertical tabs.
this.item.closest('.form-type-vertical-tabs').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.
@ -178,6 +180,10 @@ Drupal.verticalTab.prototype = {
if ($firstTab.length) {
$firstTab.data('verticalTab').focus();
}
// Hide the vertical tabs (if no tabs remain).
else {
this.item.closest('.form-type-vertical-tabs').hide();
}
return this;
}
};