diff options
author | Endi S. Dewata <edewata@redhat.com> | 2010-12-06 13:51:49 -0600 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2010-12-06 20:09:38 -0500 |
commit | 95ea68a2175cc1bec0dbb901311e40f55b692c42 (patch) | |
tree | 774f26246ffdc803c082b5222bdfe1de7358aa21 /install/static/associate.js | |
parent | 69e77212ea428f79742b9ff0452ef19d74cc76d4 (diff) | |
download | freeipa-95ea68a2175cc1bec0dbb901311e40f55b692c42.tar.gz freeipa-95ea68a2175cc1bec0dbb901311e40f55b692c42.tar.xz freeipa-95ea68a2175cc1bec0dbb901311e40f55b692c42.zip |
Column i18n
The ipa_column has been modified to get the label from metadata
during initialization. The ipa_table_widget has been modified to
initialize the columns. Hard-coded labels have been removed from
column declarations.
The ipa_adder_dialog has been modified to execute a search at the
end of setup.
Diffstat (limited to 'install/static/associate.js')
-rw-r--r-- | install/static/associate.js | 37 |
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() { |