diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2013-04-17 10:08:34 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2013-05-06 16:22:27 +0200 |
commit | 5be709bf9d4865486c239584653363c1d85492a6 (patch) | |
tree | b33ef67286459d0397b7e6241f917b6b8a9911a6 /install/ui/src/freeipa/search.js | |
parent | 5239d3750e9a82028e79ffe95b9280fb606fb47b (diff) | |
download | freeipa.git-5be709bf9d4865486c239584653363c1d85492a6.tar.gz freeipa.git-5be709bf9d4865486c239584653363c1d85492a6.tar.xz freeipa.git-5be709bf9d4865486c239584653363c1d85492a6.zip |
Builder and registry for actions
https://fedorahosted.org/freeipa/ticket/3235
Diffstat (limited to 'install/ui/src/freeipa/search.js')
-rw-r--r-- | install/ui/src/freeipa/search.js | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js index d71b0127..fafbc3b2 100644 --- a/install/ui/src/freeipa/search.js +++ b/install/ui/src/freeipa/search.js @@ -21,7 +21,16 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -define(['./ipa', './jquery', './text', './facet'], function(IPA, $, text) { +define([ + './ipa', + './jquery', + './phases', + './reg', + './text', + './facet'], + function(IPA, $, phases, reg, text) { + +var exp = {}; IPA.search_facet = function(spec, no_init) { @@ -502,5 +511,18 @@ IPA.batch_enable_action = function(spec) { return IPA.batch_items_action(spec); }; -return {}; +exp.register = function() { + + var a = reg.action; + + a.register('batch_remove', IPA.batch_remove_action); + a.register('add', IPA.add_action); + a.register('batch_items', IPA.batch_items_action); + a.register('batch_disable', IPA.batch_disable_action); + a.register('batch_enable', IPA.batch_enable_action); +}; + +phases.on('registration', exp.register); + +return exp; }); |