summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-03-29 17:09:59 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-03-29 17:09:59 -0400
commit5b781afa6642536e449ce2595afffdb98f9e5d18 (patch)
treedb8b4088d60447275a5f5affb5348bd7c6f0697a /misc
parentc202196bbb677d36d4244e0eaa3ca2ab223b024f (diff)
downloadbrdo-5b781afa6642536e449ce2595afffdb98f9e5d18.tar.gz
brdo-5b781afa6642536e449ce2595afffdb98f9e5d18.tar.bz2
Issue #2067323 by Valentine94, geerlingguy, jessebeach, vlad.dancer: Don't show empty vertical tabs area if all vertical tabs are hidden
Diffstat (limited to 'misc')
-rw-r--r--misc/vertical-tabs.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/vertical-tabs.js b/misc/vertical-tabs.js
index ebfaa4f7f..3aa0f6f9e 100644
--- a/misc/vertical-tabs.js
+++ b/misc/vertical-tabs.js
@@ -134,6 +134,8 @@ Drupal.verticalTab.prototype = {
tabShow: function () {
// Display the tab.
this.item.show();
+ // Show the vertical tabs.
+ this.item.closest('.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.
@@ -164,6 +166,10 @@ Drupal.verticalTab.prototype = {
if ($firstTab.length) {
$firstTab.data('verticalTab').focus();
}
+ // Hide the vertical tabs (if no tabs remain).
+ else {
+ this.item.closest('.vertical-tabs').hide();
+ }
return this;
}
};