Add possibility to hide only one tab in sidebar

Removes item selected by name attribute from sidebar

Part of: https://fedorahosted.org/freeipa/ticket/5426

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
Pavel Vomacka 2016-10-05 17:37:47 +02:00 committed by Martin Basti
parent 039a6f7b4f
commit 8dfe692251

View File

@ -1644,6 +1644,20 @@ exp.FacetGroupsWidget = declare([], {
return el;
},
hide_tab: function(tab_name) {
var tab = this.get_tab_el(tab_name);
if (tab) tab.css('display', 'none');
},
show_tab: function(tab_name) {
var tab = this.get_tab_el(tab_name);
if (tab) tab.css('display', '');
},
get_tab_el: function(tab_name) {
return this.tab_els[tab_name];
},
on_click: function(facet) {
if (this.facet.get_pkeys) {
var pkeys = this.facet.get_pkeys();