Merge pull request #11647 from nextcloud/make-possible-for-tab-views-to-add-css-classes-to-their-container
Make possible for tab views to add CSS classes to their container
This commit is contained in:
commit
838105877c
|
@ -174,6 +174,9 @@
|
|||
// hide other tabs
|
||||
$tabsContainer.find('.tab').addClass('hidden');
|
||||
|
||||
$tabsContainer.attr('class', 'tabsContainer');
|
||||
$tabsContainer.addClass(tabView.getTabsContainerExtraClasses());
|
||||
|
||||
// tab already rendered ?
|
||||
if (!$tabEl.length) {
|
||||
// render tab
|
||||
|
|
|
@ -40,6 +40,21 @@
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the extra CSS classes used by the tabs container when this
|
||||
* tab is the selected one.
|
||||
*
|
||||
* In general you should not extend this method, as tabs should not
|
||||
* modify the classes of its container; this is reserved as a last
|
||||
* resort for very specific cases in which there is no other way to get
|
||||
* the proper style or behaviour.
|
||||
*
|
||||
* @return {String} space-separated CSS classes
|
||||
*/
|
||||
getTabsContainerExtraClasses: function() {
|
||||
return '';
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the tab label
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue