diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-01-31 17:25:14 +0100 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-05-06 16:22:17 +0200 |
commit | 31d7486b88bc0e30c8a84ab4d2f73c35a700dad8 (patch) | |
tree | f28ee432487ef269e285064c5588e4b4168c5205 /install/ui/src/freeipa/widget.js | |
parent | 7edf044a440d9a7f60c691811acedfc6a20ecbfe (diff) | |
download | freeipa-31d7486b88bc0e30c8a84ab4d2f73c35a700dad8.tar.gz freeipa-31d7486b88bc0e30c8a84ab4d2f73c35a700dad8.tar.xz freeipa-31d7486b88bc0e30c8a84ab4d2f73c35a700dad8.zip |
Remove IPA.nav usage, obsolete entity.get_primary_key
https://fedorahosted.org/freeipa/ticket/3236
Diffstat (limited to 'install/ui/src/freeipa/widget.js')
-rw-r--r-- | install/ui/src/freeipa/widget.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/widget.js b/install/ui/src/freeipa/widget.js index 17d9b8b77..61bb03c23 100644 --- a/install/ui/src/freeipa/widget.js +++ b/install/ui/src/freeipa/widget.js @@ -1468,6 +1468,10 @@ IPA.table_widget = function (spec) { that.add_column = function(column) { column.entity = that.entity; + // check for facet to avoid overriding with undefined, because of + // initialization bug - column may be already created by facet (and + // therefore facet set) but this table widget may not have facet set. + if (that.facet) column.facet = that.facet; that.columns.put(column.name, column); }; @@ -2158,7 +2162,7 @@ IPA.attribute_table_widget = function(spec) { }; that.get_pkeys = function() { - var pkey = IPA.nav.get_state(that.entity.name+'-pkey'); + var pkey = that.facet.get_pkey(); return [pkey]; }; @@ -2201,7 +2205,7 @@ IPA.attribute_table_widget = function(spec) { } var label = that.entity.metadata.label_singular; - var pkey = IPA.nav.get_state(that.entity.name+'-pkey'); + var pkey = that.facet.get_pkey(); dialog_spec.title = dialog_spec.title || IPA.messages.dialogs.add_title; dialog_spec.title = dialog_spec.title.replace('${entity}', label); dialog_spec.title = dialog_spec.title.replace('${pkey}', pkey); |