diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-04-15 19:23:15 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-05-06 16:22:26 +0200 |
commit | 49b7f4c06e17b91372decf33b812a7fbbfa01ff4 (patch) | |
tree | 5fc871af96dec687a36e0986c0c3b829ce9de3b5 /install/ui/src/freeipa/rule.js | |
parent | 849ece00e32747238c819eb7d3ac70f0bdc90833 (diff) | |
download | freeipa-49b7f4c06e17b91372decf33b812a7fbbfa01ff4.tar.gz freeipa-49b7f4c06e17b91372decf33b812a7fbbfa01ff4.tar.xz freeipa-49b7f4c06e17b91372decf33b812a7fbbfa01ff4.zip |
Replace IPA.widget_factories and IPA_field_factories with registry
https://fedorahosted.org/freeipa/ticket/3235
Diffstat (limited to 'install/ui/src/freeipa/rule.js')
-rw-r--r-- | install/ui/src/freeipa/rule.js | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/install/ui/src/freeipa/rule.js b/install/ui/src/freeipa/rule.js index faa305a4b..194b443d6 100644 --- a/install/ui/src/freeipa/rule.js +++ b/install/ui/src/freeipa/rule.js @@ -18,8 +18,16 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -define(['./ipa', './jquery', './details', './search', './association', - './entity'], function(IPA, $) { +define([ + './ipa', + './jquery', + './phases', + './reg', + './details', + './search', + './association', + './entity'], + function(IPA, $, phases, reg) { IPA.rule_details_widget = function(spec) { @@ -223,9 +231,6 @@ IPA.rule_association_table_field = function(spec) { return that; }; -IPA.widget_factories['rule_association_table'] = IPA.rule_association_table_widget; -IPA.field_factories['rule_association_table'] = IPA.rule_association_table_field; - IPA.rule_association_adder_dialog = function(spec) { spec = spec || {}; @@ -253,5 +258,13 @@ IPA.rule_association_adder_dialog = function(spec) { return that; }; +phases.on('registration', function() { + var w = reg.widget; + var f = reg.field; + + w.register('rule_association_table', IPA.rule_association_table_widget); + f.register('rule_association_table', IPA.rule_association_table_field); +}); + return {}; });
\ No newline at end of file |