mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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)
This commit is contained in:
parent
8c9560d288
commit
11f4756225
@ -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));
|
Loading…
Reference in New Issue
Block a user