diff options
author | Adam Young <ayoung@redhat.com> | 2011-01-25 21:58:49 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-01-26 10:07:21 -0500 |
commit | dcb796df6e92b71ba22667f13b7801014f63e07e (patch) | |
tree | 0f6afa151f747ce54223253060fa0246c7921f8a /install/ui | |
parent | aa61337221ccef261dc483192e6acb3276e8cbee (diff) | |
download | freeipa-dcb796df6e92b71ba22667f13b7801014f63e07e.tar.gz freeipa-dcb796df6e92b71ba22667f13b7801014f63e07e.tar.xz freeipa-dcb796df6e92b71ba22667f13b7801014f63e07e.zip |
dns visible if enabled
use the result of the is_dns_enabled command to show or hid the dns tab
Also, Javascript lint cleanup from recent patches.
Diffstat (limited to 'install/ui')
-rw-r--r-- | install/ui/entity.js | 2 | ||||
-rw-r--r-- | install/ui/ipa.js | 1 | ||||
-rw-r--r-- | install/ui/webui.js | 13 |
3 files changed, 12 insertions, 4 deletions
diff --git a/install/ui/entity.js b/install/ui/entity.js index 34e34d6cf..e7fa6a7a3 100644 --- a/install/ui/entity.js +++ b/install/ui/entity.js @@ -434,7 +434,7 @@ IPA.nested_tabs = function(entity_name){ IPA.nested_tab_labels[entity_name] = top_tab.children[subtab_index].label; if (top_tab.children[subtab_index].children){ - label = top_tab.children[subtab_index].label + label = top_tab.children[subtab_index].label; nested_entities = top_tab.children[subtab_index].children; for ( nested_index = 0; nested_index < nested_entities.length; diff --git a/install/ui/ipa.js b/install/ui/ipa.js index 5e22b2c3f..725bf17c5 100644 --- a/install/ui/ipa.js +++ b/install/ui/ipa.js @@ -95,6 +95,7 @@ var IPA = ( function () { that.messages = data.result.results[1].messages; that.whoami = data.result.results[2].result[0]; that.env = data.result.results[3].result; + that.dns_enabled = data.result.results[4].result; if (on_success) { on_success(data, text_status, xhr); } diff --git a/install/ui/webui.js b/install/ui/webui.js index b1097f63a..f5b77c851 100644 --- a/install/ui/webui.js +++ b/install/ui/webui.js @@ -27,7 +27,7 @@ IPA.admin_tab_set = function () { - return [ + var tabset = [ {name:'identity', label: IPA.messages.tabs.identity, children:[ {name:'user', entity:'user'}, {name:'group', entity:'group'}, @@ -37,7 +37,6 @@ IPA.admin_tab_set = function () { {name:'service', entity:'service'} ]}, {name:'policy', label: IPA.messages.tabs.policy, children:[ - {name:'dnszone', entity:'dnszone'}, {name:'hbacrule', label: IPA.messages.tabs.hbac , entity:'hbacrule', children:[ {name:'hbacsvc', entity:'hbacsvc'}, @@ -60,6 +59,14 @@ IPA.admin_tab_set = function () { {name:'delegation' ,entity:'delegation'}, {name:'config', entity:'config'} ]}]; + + if (IPA.dns_enabled){ + tabset[1].children.unshift( + {name:'dnszone', entity:'dnszone'} + ); + } + + return tabset; }; IPA.self_serv_tab_set = function(){ @@ -139,7 +146,7 @@ $(function() { IPA.tab_set = IPA.admin_tab_set(); nav_create(IPA.tab_set, navigation, 'tabs'); } else { - IPA.tab_set = self_serv_tab_set(); + IPA.tab_set = IPA.self_serv_tab_set(); nav_create(IPA.tab_set, navigation, 'tabs'); var state = {'user-pkey':IPA.whoami_pkey , |