diff options
author | Adam Young <ayoung@redhat.com> | 2010-11-19 15:57:40 -0500 |
---|---|---|
committer | Endi Sukma Dewata <edewata@redhat.com> | 2010-11-29 21:13:26 -0500 |
commit | 7b91e9d83dd12c18ebe5d57f3fb86e1c27703b58 (patch) | |
tree | bd43147c1fde8019b8ff4870ec2b13620aebb1b8 /install/static/widget.js | |
parent | b683c7261bcadc6899168d7cff8bd218a3501ba6 (diff) | |
download | freeipa.git-7b91e9d83dd12c18ebe5d57f3fb86e1c27703b58.tar.gz freeipa.git-7b91e9d83dd12c18ebe5d57f3fb86e1c27703b58.tar.xz freeipa.git-7b91e9d83dd12c18ebe5d57f3fb86e1c27703b58.zip |
top nav index allows links between differnt top level tabs by calculating the index of the top level tab for the target tab. new version creats third level navigation for nested entities, such as SUDO and HBAC
Diffstat (limited to 'install/static/widget.js')
-rwxr-xr-x | install/static/widget.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/install/static/widget.js b/install/static/widget.js index 060f258e..c2184c64 100755 --- a/install/static/widget.js +++ b/install/static/widget.js @@ -421,6 +421,7 @@ function ipa_button_widget(spec) { return that; } + function ipa_column_widget(spec) { spec = spec || {}; @@ -431,6 +432,7 @@ function ipa_column_widget(spec) { that.primary_key = spec.primary_key; that.setup = spec.setup || setup; that.link = spec.link; + that.other_entity = spec.other_entity; function setup(container, name, value, record) { @@ -445,13 +447,11 @@ function ipa_column_widget(spec) { 'html': value, 'click': function (value) { return function() { - var state = {}; - state[that.entity_name + '-facet'] = 'details'; - state[that.entity_name + '-pkey'] = value; - //Before this will work, we need to set the tab one level up - //for example: - //state['identity'] = 0; - //but we have no way of getting the index. + var target_entity = that.other_entity || + that.entity_name; + var state = IPA.tab_state(target_entity); + state[target_entity + '-facet'] = 'details'; + state[target_entity + '-pkey'] = value; $.bbq.pushState(state); return false; |