From 583bfcdc58e8fb38c26de5d8d0b4fa67f69895ed Mon Sep 17 00:00:00 2001
From: Adam Young <ayo...@redhat.com>
Date: Tue, 7 Dec 2010 13:44:54 -0500
Subject: [PATCH] nested entity navigation
 Made the mechanism for caluculating nested eneties more general, so that
 we don't have to hard code for SUDO and HBAC,  and now to support ACI

---
 install/static/navigation.js |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/install/static/navigation.js b/install/static/navigation.js
index 98c13a923677ec734f11550bc2c42b7027f830a3..aa03becc4882b88f0138a0a047dc7162be122547 100644
--- a/install/static/navigation.js
+++ b/install/static/navigation.js
@@ -136,9 +136,11 @@ function _nav_update_tabs(nls, container,depth)
     } else if (tab.setup) {
         var entity_name = tab.name;
 
-        // TODO: do not hard-code
-        if (entity_name == 'hbac' && nav_get_state('hbac-entity')) entity_name = nav_get_state('hbac-entity');
-        if (entity_name == 'sudorule' && nav_get_state('sudorule-entity')) entity_name = nav_get_state('sudorule-entity');
+        var nested_entity = nav_get_state(entity_name+'-entity');
+
+        if (nested_entity){
+            entity_name = nested_entity;
+        }
 
         var entity = IPA.get_entity(entity_name);
         entity.setup(container2);
-- 
1.7.2.3

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to