mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 23:58:23 -05:00
Removed entity.get_primary from association facet
Also removed facet usage from entity adder dialog. https://fedorahosted.org/freeipa/ticket/3236
This commit is contained in:
@@ -60,7 +60,6 @@ IPA.entity_adder_dialog = function(spec) {
|
||||
function(data, text_status, xhr) {
|
||||
that.added.notify();
|
||||
that.show_message(that.get_success_message(data));
|
||||
that.facet.refresh();
|
||||
that.reset();
|
||||
that.focus_first_element();
|
||||
},
|
||||
@@ -101,7 +100,6 @@ IPA.entity_adder_dialog = function(spec) {
|
||||
that.add(
|
||||
function(data, text_status, xhr) {
|
||||
that.added.notify();
|
||||
that.facet.refresh();
|
||||
that.close();
|
||||
that.notify_success(data);
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -131,7 +131,12 @@ IPA.search_facet = function(spec, no_init) {
|
||||
|
||||
that.show_add_dialog = function() {
|
||||
var dialog = that.managed_entity.get_dialog('add');
|
||||
dialog.facet = that;
|
||||
if (!that.adder_dialog) {
|
||||
that.adder_dialog = dialog;
|
||||
dialog.added.attach(function() {
|
||||
that.refresh();
|
||||
});
|
||||
}
|
||||
dialog.pkey_prefix = that.managed_entity_pkey_prefix();
|
||||
dialog.open(that.container);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user