use other_entity for adder columns

delay creation of the table until the columns have been set
https://fedorahosted.org/freeipa/ticket/1544
This commit is contained in:
Adam Young 2011-07-28 22:25:26 -04:00 committed by Endi S. Dewata
parent a22d00234f
commit bb45e51809
2 changed files with 6 additions and 2 deletions

View File

@ -715,7 +715,7 @@ IPA.association_facet = function (spec) {
factory = IPA.column;
spec = { name: spec };
}
spec.entity = that.entity;
spec.entity_name = that.other_entity;
column = factory(spec);
that.add_adder_column(column);
return column;

View File

@ -369,6 +369,11 @@ IPA.adder_dialog = function (spec) {
}
that.create = function() {
/*TODO: move this earlier
The table initialization should be done earlier. However,
the adder columns are not added until after initialization is over,
and thus we have to dleay the creation of the table.*/
initialize_table();
// do not call that.dialog_create();
@ -564,7 +569,6 @@ IPA.adder_dialog = function (spec) {
}
}
initialize_table();
that.adder_dialog_create = that.create;