summaryrefslogtreecommitdiffstats
path: root/install/static/associate.js
diff options
context:
space:
mode:
Diffstat (limited to 'install/static/associate.js')
-rw-r--r--install/static/associate.js37
1 files changed, 25 insertions, 12 deletions
diff --git a/install/static/associate.js b/install/static/associate.js
index 1a96362f5..48bb0225f 100644
--- a/install/static/associate.js
+++ b/install/static/associate.js
@@ -153,15 +153,9 @@ function ipa_association_adder_dialog(spec) {
}
that.adder_dialog_init();
- execute_search('');
-
};
that.search = function() {
- execute_search(that.get_filter());
- };
-
- function execute_search(filter){
function on_success(data, text_status, xhr) {
var results = data.result;
that.clear_available_values();
@@ -172,8 +166,8 @@ function ipa_association_adder_dialog(spec) {
}
}
- ipa_cmd('find', [filter], {'all': true}, on_success, null, that.other_entity);
- }
+ ipa_cmd('find', [that.get_filter()], {'all': true}, on_success, null, that.other_entity);
+ };
return that;
}
@@ -250,7 +244,6 @@ function ipa_association_table_widget(spec) {
};
that.add_adder_column = function(column) {
- column.entity_name = that.entity_name;
that.adder_columns.push(column);
that.adder_columns_by_name[column.name] = column;
};
@@ -284,6 +277,16 @@ function ipa_association_table_widget(spec) {
});
}
+ for (var i=0; i<that.columns.length; i++) {
+ var column = that.columns[i];
+ column.entity_name = that.other_entity;
+ }
+
+ for (var i=0; i<that.adder_columns.length; i++) {
+ var column = that.adder_columns[i];
+ column.entity_name = that.other_entity;
+ }
+
that.table_init();
};
@@ -523,7 +526,6 @@ function ipa_association_facet(spec) {
};
that.add_column = function(column) {
- column.entity_name = that.entity_name;
that.columns.push(column);
that.columns_by_name[column.name] = column;
};
@@ -539,7 +541,6 @@ function ipa_association_facet(spec) {
};
that.add_adder_column = function(column) {
- column.entity_name = that.entity_name;
that.adder_columns.push(column);
that.adder_columns_by_name[column.name] = column;
};
@@ -552,6 +553,8 @@ function ipa_association_facet(spec) {
that.init = function() {
+ that.facet_init();
+
var entity = IPA.get_entity(that.entity_name);
var association = entity.get_association(that.other_entity);
@@ -608,7 +611,17 @@ function ipa_association_facet(spec) {
};
}
- that.facet_init();
+ for (var i=0; i<that.columns.length; i++) {
+ var column = that.columns[i];
+ column.entity_name = that.other_entity;
+ }
+
+ for (var i=0; i<that.adder_columns.length; i++) {
+ var column = that.adder_columns[i];
+ column.entity_name = that.other_entity;
+ }
+
+ that.table.init();
};
that.is_dirty = function() {