mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fixed problem with navigation tabs on reload.
The navigation have been fixed to show the correct active tabs after browser reload. Ticket #1362
This commit is contained in:
committed by
Adam Young
parent
c329a54c09
commit
f47ec11727
@@ -132,7 +132,9 @@ IPA.navigation = function(spec) {
|
||||
|
||||
that.create = function() {
|
||||
|
||||
var container = $('<div/>').appendTo(that.container);
|
||||
var container = $('<div/>', {
|
||||
name: 'navigation'
|
||||
}).appendTo(that.container);
|
||||
|
||||
that._create(that.tabs, container, 1);
|
||||
|
||||
@@ -152,13 +154,11 @@ IPA.navigation = function(spec) {
|
||||
container.addClass(that.tab_class);
|
||||
container.addClass('tabs'+depth);
|
||||
|
||||
var parent_id = container.attr('id');
|
||||
|
||||
var ul = $('<ul/>').appendTo(container);
|
||||
|
||||
for (var i=0; i<tabs.length; i++) {
|
||||
var tab = tabs[i];
|
||||
var tab_id = parent_id+'-'+i;
|
||||
var tab_id = 'navigation-'+tab.name;
|
||||
|
||||
if (tab.entity) {
|
||||
var entity = IPA.get_entity(tab.entity);
|
||||
@@ -201,12 +201,14 @@ IPA.navigation = function(spec) {
|
||||
that.content.removeClass(that.tab_class+'-'+i);
|
||||
}
|
||||
$('.entity', that.content).css('display', 'none');
|
||||
that._update(that.tabs, that.container, 1);
|
||||
|
||||
var container = $('div[name=navigation]', that.container);
|
||||
that._update(that.tabs, container, 1);
|
||||
};
|
||||
|
||||
that._update = function(tabs, container, depth) {
|
||||
|
||||
var parent_name = container.attr('name') || container.attr('id');
|
||||
var parent_name = container.attr('name');
|
||||
var tab_name = that.get_state(parent_name);
|
||||
|
||||
var index = 0;
|
||||
|
||||
Reference in New Issue
Block a user