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/associate.js | 64 ++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'install/static/associate.js') diff --git a/install/static/associate.js b/install/static/associate.js index d4e26353..bcf81a13 100644 --- a/install/static/associate.js +++ b/install/static/associate.js @@ -22,7 +22,7 @@ /* CURRENTLY ALSO REQUIRES search.js, because it reuses it's code to create * the AssociationList elements; IT NEEDS IT'S OWN CODE! */ -function ipa_associator(spec) { +IPA.associator = function (spec) { spec = spec || {}; @@ -52,7 +52,7 @@ function serial_associator(spec) { spec = spec || {}; - var that = ipa_associator(spec); + var that = IPA.associator(spec); that.execute = function() { @@ -71,7 +71,7 @@ function serial_associator(spec) { var options = {}; options[that.entity_name] = that.pkey; - ipa_cmd( + IPA.cmd( that.method, args, options, @@ -91,7 +91,7 @@ function bulk_associator(spec) { spec = spec || {}; - var that = ipa_associator(spec); + var that = IPA.associator(spec); that.execute = function() { @@ -114,7 +114,7 @@ function bulk_associator(spec) { var options = { 'all': true }; options[that.other_entity] = value; - ipa_cmd( + IPA.cmd( that.method, args, options, @@ -129,11 +129,11 @@ function bulk_associator(spec) { /** * This dialog is used for adding associations between two entities. */ -function ipa_association_adder_dialog(spec) { +IPA.association_adder_dialog = function (spec) { spec = spec || {}; - var that = ipa_adder_dialog(spec); + var that = IPA.adder_dialog(spec); that.entity_name = spec.entity_name; that.pkey = spec.pkey; @@ -195,7 +195,7 @@ function ipa_association_adder_dialog(spec) { } } - ipa_cmd('find', [that.get_filter()], options, on_success, null, that.other_entity); + IPA.cmd('find', [that.get_filter()], options, on_success, null, that.other_entity); }; that.association_adder_dialog_init = that.init; @@ -207,11 +207,11 @@ function ipa_association_adder_dialog(spec) { /** * This dialog is used for removing associations between two entities. */ -function ipa_association_deleter_dialog(spec) { +IPA.association_deleter_dialog = function (spec) { spec = spec || {}; - var that = ipa_deleter_dialog(spec); + var that = IPA.deleter_dialog(spec); that.entity_name = spec.entity_name; that.pkey = spec.pkey; @@ -242,7 +242,7 @@ function ipa_association_deleter_dialog(spec) { return that; } -function ipa_association_config(spec) { +IPA.association_config = function (spec) { spec = spec || {}; @@ -256,11 +256,11 @@ function ipa_association_config(spec) { return that; } -function ipa_association_table_widget(spec) { +IPA.association_table_widget = function (spec) { spec = spec || {}; - var that = ipa_table_widget(spec); + var that = IPA.table_widget(spec); that.other_entity = spec.other_entity; that.attribute_member = spec.attribute_member; @@ -282,7 +282,7 @@ function ipa_association_table_widget(spec) { }; that.create_adder_column = function(spec) { - var column = ipa_column(spec); + var column = IPA.column(spec); that.add_adder_column(column); return column; }; @@ -384,7 +384,7 @@ function ipa_association_table_widget(spec) { if (!that.values.length) return; - var batch = ipa_batch_command({ + var batch = IPA.batch_command({ 'name': that.entity_name+'_'+that.name, 'on_success': on_success, 'on_error': on_error @@ -393,7 +393,7 @@ function ipa_association_table_widget(spec) { for (var i=0; i