Skip to content

Commit

Permalink
ENHANCEMENT Auto-hiding tab bar in CMS forms if only a single tab is …
Browse files Browse the repository at this point in the history
…available (to save screen space and reduce UI clutter) (see #7261)
  • Loading branch information
chillu committed May 9, 2012
1 parent 8c9560d commit 11f4756
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions admin/javascript/LeftAndMain.EditForm.js
Expand Up @@ -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.