summaryrefslogtreecommitdiffstats
path: root/install/ui/navigation.js
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2011-06-21 09:18:24 -0500
committerAdam Young <ayoung@redhat.com>2011-06-21 14:44:45 -0400
commitf47ec1172761eb08a5f54ce73e8508f5c3729756 (patch)
tree5b63ee5abf74d82b520c979a351375445c898bce /install/ui/navigation.js
parentc329a54c093f856d129cf74528d24d13d1792326 (diff)
downloadfreeipa-f47ec1172761eb08a5f54ce73e8508f5c3729756.tar.gz
freeipa-f47ec1172761eb08a5f54ce73e8508f5c3729756.tar.xz
freeipa-f47ec1172761eb08a5f54ce73e8508f5c3729756.zip
Fixed problem with navigation tabs on reload.
The navigation have been fixed to show the correct active tabs after browser reload. Ticket #1362
Diffstat (limited to 'install/ui/navigation.js')
-rw-r--r--install/ui/navigation.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/install/ui/navigation.js b/install/ui/navigation.js
index 308f21154..5d70f8792 100644
--- a/install/ui/navigation.js
+++ b/install/ui/navigation.js
@@ -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;