From 31eebda584d556454104a8fbf26974b6b49d9589 Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Wed, 29 Feb 2012 18:53:11 +0100 Subject: Removed CSV creation from UI Creating CSV values in UI is unnecessary and error-prone because server converts them back to list. Possible problems with values containing commas may occur. All occurrences of CSV joining were therefore removed. https://fedorahosted.org/freeipa/ticket/2227 --- install/ui/association.js | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) (limited to 'install/ui/association.js') diff --git a/install/ui/association.js b/install/ui/association.js index 72e1f0c0..b170b39d 100644 --- a/install/ui/association.js +++ b/install/ui/association.js @@ -110,29 +110,17 @@ IPA.bulk_associator = function(spec) { return; } - var value = that.values.shift(); - if (!value) { - that.on_success(); - return; - } - - while (that.values.length > 0) { - value += ',' + that.values.shift(); - } - - var args = [that.pkey]; - var options = { 'all': true }; - options[that.other_entity.name] = value; - var command = IPA.command({ entity: that.entity.name, method: that.method, - args: args, - options: options, + args: [that.pkey], + options: { 'all': true }, on_success: that.on_success, on_error: that.on_error }); + command.set_option(that.other_entity.name, that.values); + //alert(JSON.stringify(command.to_json())); command.execute(); @@ -556,7 +544,7 @@ IPA.association_table_widget = function (spec) { on_success: on_success, on_error: on_error }); - command.set_option(that.other_entity.name, values.join(',')); + command.set_option(that.other_entity.name, values); command.execute(); }; @@ -619,7 +607,7 @@ IPA.association_table_widget = function (spec) { on_error: on_error }); - command.set_option(that.other_entity.name, values.join(',')); + command.set_option(that.other_entity.name, values); command.execute(); }; -- cgit