From 680148ed036bcef5ecfc0ca1938b9768d8a233ca Mon Sep 17 00:00:00 2001 From: Adam Young Date: Wed, 12 Jan 2011 19:51:22 -0500 Subject: scoping functions converting function of the form ipa_ to IPA. to remove them from the global namespace. https://fedorahosted.org/freeipa/ticket/212 --- install/static/aci.js | 108 ++++++++++++------------ install/static/add.js | 6 +- install/static/associate.js | 64 +++++++------- install/static/certificate.js | 28 +++---- install/static/details.js | 100 +++++++++------------- install/static/entity.js | 77 +++++++++-------- install/static/group.js | 38 ++++----- install/static/hbacrule.js | 106 +++++++++++------------ install/static/hbacsvc.js | 30 +++---- install/static/hbacsvcgroup.js | 38 ++++----- install/static/host.js | 52 ++++++------ install/static/hostgroup.js | 14 ++-- install/static/ipa.js | 37 ++++---- install/static/netgroup.js | 14 ++-- install/static/policy.js | 67 ++++++++------- install/static/rule.js | 18 ++-- install/static/search.js | 26 +++--- install/static/serverconfig.js | 4 +- install/static/service.js | 54 ++++++------ install/static/sudocmd.js | 50 +++++------ install/static/sudocmdgroup.js | 38 ++++----- install/static/sudorule.js | 140 +++++++++++++++---------------- install/static/test/aci_tests.js | 2 +- install/static/test/association_tests.js | 29 ++++--- install/static/test/details_tests.js | 34 ++++---- install/static/test/entity_tests.js | 12 +-- install/static/test/ipa_tests.js | 50 +++++------ install/static/test/navigation_tests.js | 4 +- install/static/user.js | 42 +++++----- install/static/widget.js | 61 +++++++------- 30 files changed, 662 insertions(+), 681 deletions(-) mode change 100755 => 100644 install/static/certificate.js mode change 100755 => 100644 install/static/hbacrule.js mode change 100755 => 100644 install/static/hbacsvc.js mode change 100755 => 100644 install/static/hbacsvcgroup.js mode change 100755 => 100644 install/static/rule.js mode change 100755 => 100644 install/static/sudocmd.js mode change 100755 => 100644 install/static/sudocmdgroup.js mode change 100755 => 100644 install/static/sudorule.js mode change 100755 => 100644 install/static/widget.js (limited to 'install/static') diff --git a/install/static/aci.js b/install/static/aci.js index 02b9c4be0..9d3ee546f 100644 --- a/install/static/aci.js +++ b/install/static/aci.js @@ -47,7 +47,7 @@ IPA.populate_attribute_table = function (table, entity){ IPA.attribute_table_widget= function (spec){ var id = spec.name; - var that = ipa_widget(spec); + var that = IPA.widget(spec); var object_type = spec.objecttype || 'user'; var table; @@ -116,7 +116,7 @@ IPA.attribute_table_widget= function (spec){ IPA.entity_select_widget = function(spec){ - var that = ipa_widget(spec); + var that = IPA.widget(spec); var entity = spec.entity || 'group'; function populate_select(value){ @@ -137,7 +137,7 @@ IPA.entity_select_widget = function(spec){ } function find_error(err){ } - ipa_command({ + IPA.command({ method: entity+'_find', args:[that.entity_filter.val()], options:{}, @@ -199,7 +199,7 @@ IPA.entity_select_widget = function(spec){ IPA.rights_widget = function(spec){ var rights = ['write','add','delete']; - var that = ipa_widget({name:'permissions',label:'Permissions'}); + var that = IPA.widget({name:'permissions',label:'Permissions'}); that.id = spec.id; that.create = function(container){ @@ -259,7 +259,7 @@ IPA.rights_widget = function(spec){ IPA.hidden_widget = function(spec){ spec.label = ''; - var that = ipa_widget(spec); + var that = IPA.widget(spec); that.id = spec.id; var value = spec.value || ''; that.create = function(container){ @@ -280,24 +280,24 @@ IPA.hidden_widget = function(spec){ return that; }; -function ipa_rights_section() { +IPA.rights_section = function () { var spec = { 'name':'rights', 'label': 'Rights' }; - var that = ipa_details_section(spec); + var that = IPA.details_section(spec); that.add_field(IPA.rights_widget({name:'permissions'})); return that; } -function ipa_target_section() { +IPA.target_section = function () { var spec = { 'name':'target', 'label': 'Target' }; - var that = ipa_details_section(spec); + var that = IPA.details_section(spec); var groupings = ['aci_by_type', 'aci_by_query', 'aci_by_group', 'aci_by_filter' ]; var inputs = ['input', 'select', 'textarea']; @@ -364,7 +364,7 @@ function ipa_target_section() { attribute_table, this.options[this.selectedIndex].value); } }).appendTo(dd); - var type_params=ipa_get_param_info("permission","type"); + var type_params=IPA.get_param_info("permission","type"); for (var pc =0; pc < type_params.values.length; pc += 1){ type_select.append($('