summaryrefslogtreecommitdiffstats
path: root/install/ui/association.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2012-02-29 18:53:11 +0100
committerEndi S. Dewata <edewata@redhat.com>2012-03-02 11:45:21 -0600
commit31eebda584d556454104a8fbf26974b6b49d9589 (patch)
tree5a883895aed910941817a7cd750e5dbbae23e679 /install/ui/association.js
parentafad0775e16e52aa2d6637e809ad748ace838bea (diff)
downloadfreeipa.git-31eebda584d556454104a8fbf26974b6b49d9589.tar.gz
freeipa.git-31eebda584d556454104a8fbf26974b6b49d9589.tar.xz
freeipa.git-31eebda584d556454104a8fbf26974b6b49d9589.zip
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
Diffstat (limited to 'install/ui/association.js')
-rw-r--r--install/ui/association.js24
1 files changed, 6 insertions, 18 deletions
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();
};