summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/association.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-03-14 13:59:15 +0100
committerPetr Vobornik <pvoborni@redhat.com>2013-05-06 16:22:18 +0200
commit166102a910bad2002819205b009694372f1f0e22 (patch)
treef824c41c873dc3000e5d0980612e773ab90d6253 /install/ui/src/freeipa/association.js
parentbf8bae5080582f0088bda2aab6695d7cedc8b164 (diff)
downloadfreeipa-166102a910bad2002819205b009694372f1f0e22.tar.gz
freeipa-166102a910bad2002819205b009694372f1f0e22.tar.xz
freeipa-166102a910bad2002819205b009694372f1f0e22.zip
Removed entity.get_primary from association facet
Also removed facet usage from entity adder dialog. https://fedorahosted.org/freeipa/ticket/3236
Diffstat (limited to 'install/ui/src/freeipa/association.js')
-rw-r--r--install/ui/src/freeipa/association.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js
index 30ae99393..5642d64e1 100644
--- a/install/ui/src/freeipa/association.js
+++ b/install/ui/src/freeipa/association.js
@@ -154,12 +154,13 @@ IPA.attribute_adder_dialog = function(spec) {
spec.subject = metadata.label;
var that = IPA.entity_adder_dialog(spec);
+ that.pkeys = spec.pkeys || [];
that.create_add_command = function(record) {
var command = that.entity_adder_dialog_create_add_command(record);
- command.add_args(that.entity.get_primary_key());
+ command.add_args(that.pkeys);
return command;
};
@@ -1100,7 +1101,6 @@ IPA.association_facet = function (spec, no_init) {
if (that.indirect_radio) that.indirect_radio.prop('checked', true);
}
- //var pkey = that.entity.get_primary_key();
var pkeys = that.get_pkeys();
var command = IPA.command({
@@ -1232,7 +1232,7 @@ IPA.attribute_facet = function(spec, no_init) {
that.refresh = function() {
- var pkey = that.entity.get_primary_key();
+ var pkey = that.get_pkeys();
var command = IPA.command({
entity: that.entity.name,
@@ -1269,9 +1269,13 @@ IPA.attribute_facet = function(spec, no_init) {
var dialog = IPA.attribute_adder_dialog({
attribute: spec.attribute,
- entity: that.entity
+ entity: that.entity,
+ pkeys: that.get_pkeys()
});
+ dialog.added.attach(function() {
+ that.refresh();
+ });
dialog.open(that.container);
};
@@ -1310,7 +1314,7 @@ IPA.attribute_facet = function(spec, no_init) {
that.remove = function(values, on_success, on_error) {
- var pkey = that.entity.get_primary_key();
+ var pkey = that.get_pkeys();
var command = IPA.command({
entity: that.entity.name,