summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/search.js
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2015-04-23 12:03:04 +0200
committerPetr Vobornik <pvoborni@redhat.com>2015-05-20 14:04:10 +0200
commitc352616ac9fbb1685adcbe8834143b24f6e8b5d4 (patch)
tree3011912b2554591dd0b961ea4be42d6bee1e93a7 /install/ui/src/freeipa/search.js
parent69bc4f4955c8ee0bdbeea5ca340a003c128e9a58 (diff)
downloadfreeipa-c352616ac9fbb1685adcbe8834143b24f6e8b5d4.tar.gz
freeipa-c352616ac9fbb1685adcbe8834143b24f6e8b5d4.tar.xz
freeipa-c352616ac9fbb1685adcbe8834143b24f6e8b5d4.zip
webui: declare search command options in search facet
A search facet could be defined with an option which is always applied during entity-find command on facet refresh. e.g. ipa user-find --preserved Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa/search.js')
-rw-r--r--install/ui/src/freeipa/search.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js
index 834ff8a04..35c533473 100644
--- a/install/ui/src/freeipa/search.js
+++ b/install/ui/src/freeipa/search.js
@@ -93,12 +93,24 @@ exp.search_facet_pre_op = function(spec, context) {
return spec;
};
+/**
+ * Search facet
+ * @class IPA.search_facet
+ */
IPA.search_facet = function(spec, no_init) {
spec = spec || {};
var that = IPA.table_facet(spec, true);
+ /**
+ * Additional command options which are added to refresh command on
+ * refresh.
+ *
+ * @property {Object}
+ */
+ that.command_options = spec.command_options || {};
+
that.deleter_dialog = spec.deleter_dialog || IPA.search_deleter_dialog;
that.create_header = function(container) {
@@ -232,6 +244,15 @@ IPA.search_facet = function(spec, no_init) {
return args;
};
+ /**
+ * Provide RPC options for refresh command
+ * - override point
+ */
+ that.get_refresh_command_options = function() {
+
+ return that.command_options;
+ };
+
that.create_refresh_command = function() {
var args = that.get_refresh_command_args();
@@ -243,6 +264,8 @@ IPA.search_facet = function(spec, no_init) {
args: args
});
+ command.set_options(that.get_refresh_command_options());
+
if (that.pagination) {
if (!that.search_all_entries) command.set_option('pkey_only', true);
command.set_option('sizelimit', 0);