Permalink
Browse files

ENHANCEMENT Auto-hiding tab bar in CMS forms if only a single tab is …

…available (to save screen space and reduce UI clutter) (see #7261)
  • Loading branch information...
1 parent 8c9560d commit 11f4756225e6a8f5e5b3c7e47a0f5f4b15ea23ad @chillu chillu committed May 9, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 admin/javascript/LeftAndMain.EditForm.js
@@ -193,6 +193,17 @@
}
});
+ /**
+ * Hide tabs when only one is available
+ */
+ $('.cms-edit-form .ss-tabset').entwine({
+ onmatch: function() {
+ var tabs = this.find("ul:first").children('li');
+ if(tabs.length == 1) this.find('ul:first').hide();
+ this._super();
+ }
+ });
+
});
}(jQuery));

0 comments on commit 11f4756

Please sign in to comment.