From dda8d4d3f9b51e4515322bb6a6e8ccfd4e206b07 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Thu, 29 Aug 2013 01:18:25 +0100 Subject: [PATCH] Issue #2067323 by geerlingguy, jessebeach: Fixed Don't show empty vertical tabs area if all vertical tabs are hidden. --- core/misc/vertical-tabs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/misc/vertical-tabs.js b/core/misc/vertical-tabs.js index acd181bb59d7..fe95e8eb31d0 100644 --- a/core/misc/vertical-tabs.js +++ b/core/misc/vertical-tabs.js @@ -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; } }; -- GitLab