summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/search.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2013-09-12 15:29:01 +0200
committerPetr Viktorin <pviktori@redhat.com>2014-03-12 17:29:28 +0100
commitfef26fe3d8355c5c3f22348bb7390af0a1e5cef7 (patch)
tree3cc650d628d3eb1ce16f74db0bc58a1454392c86 /install/ui/src/freeipa/search.js
parent0700b13807fd5e9a8503ba5b88d2e1aec417aef6 (diff)
downloadfreeipa-fef26fe3d8355c5c3f22348bb7390af0a1e5cef7.tar.gz
freeipa-fef26fe3d8355c5c3f22348bb7390af0a1e5cef7.tar.xz
freeipa-fef26fe3d8355c5c3f22348bb7390af0a1e5cef7.zip
UI for OTP tokens
https://fedorahosted.org/freeipa/ticket/3369 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/search.js')
-rw-r--r--install/ui/src/freeipa/search.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js
index 3c2fca715..394de3e8c 100644
--- a/install/ui/src/freeipa/search.js
+++ b/install/ui/src/freeipa/search.js
@@ -466,6 +466,7 @@ IPA.batch_items_action = function(spec) {
that.method = spec.method || 'disable';
that.success_msg = text.get(spec.success_msg);
+ that.options = spec.options || {};
that.execute_action = function(facet, on_success, on_error) {
@@ -483,18 +484,23 @@ IPA.batch_items_action = function(spec) {
var item_keys = pkeys.splice(0);
item_keys.push(selected_keys[i]);
- var command = IPA.command({
- entity: entity.name,
- method: that.method,
- args: item_keys
- });
-
+ var command = that.create_action_command(facet, item_keys);
that.batch.add_command(command);
}
that.batch.execute();
};
+ that.create_action_command = function(facet, keys) {
+ var command = IPA.command({
+ entity: facet.managed_entity.name,
+ method: that.method,
+ args: keys,
+ options: that.options
+ });
+ return command;
+ };
+
that.on_success = function(facet, data, text_status, xhr) {
facet.on_update.notify();
facet.refresh();