summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2015-05-19 18:48:06 +0200
committerPetr Vobornik <pvoborni@redhat.com>2015-05-20 14:04:10 +0200
commit7ddcff3ef71a1d4254d291bdab99075f2cd8f205 (patch)
tree18a0e423880408479dac2b37e4061d6a57da8e5c /install/ui/src/freeipa
parent99d282d38d0c847ebb544140edd49d6572f06cb0 (diff)
downloadfreeipa-7ddcff3ef71a1d4254d291bdab99075f2cd8f205.tar.gz
freeipa-7ddcff3ef71a1d4254d291bdab99075f2cd8f205.tar.xz
freeipa-7ddcff3ef71a1d4254d291bdab99075f2cd8f205.zip
webui: prefer search facet's deleter dialog
Deleter dialog in search facet is now chosen in order as follows: - facet's, defined as spec, e.g.: deleter_dialog: { $factory: IPA.user.deleter_dialog } - entity's, the same but it entity spec - default, which is IPA.search_deleter_dialog Previous didn't allow to override entity dialog with facet one and also definition by spec was not allowed. Reviewed-By: David Kupka <dkupka@redhat.com> Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
Diffstat (limited to 'install/ui/src/freeipa')
-rw-r--r--install/ui/src/freeipa/search.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js
index 87523b673..941597561 100644
--- a/install/ui/src/freeipa/search.js
+++ b/install/ui/src/freeipa/search.js
@@ -22,6 +22,7 @@
*/
define([
+ './builder',
'./ipa',
'./jquery',
'./phases',
@@ -30,7 +31,7 @@ define([
'./spec_util',
'./text',
'./facet'],
- function(IPA, $, phases, reg, rpc, su, text, mod_facet) {
+ function(builder, IPA, $, phases, reg, rpc, su, text, mod_facet) {
var exp = {};
@@ -111,7 +112,7 @@ IPA.search_facet = function(spec, no_init) {
*/
that.command_options = spec.command_options || {};
- that.deleter_dialog = spec.deleter_dialog || IPA.search_deleter_dialog;
+ that.deleter_dialog = spec.deleter_dialog;
that.create_header = function(container) {
@@ -191,10 +192,12 @@ IPA.search_facet = function(spec, no_init) {
return null;
}
- var dialog = that.managed_entity.get_dialog('remove');
-
+ var dialog = builder.build('', that.deleter_dialog);
+ if (!dialog) {
+ dialog = that.managed_entity.get_dialog('remove');
+ }
if (!dialog) {
- dialog = that.deleter_dialog();
+ dialog = IPA.search_deleter_dialog();
}
dialog.entity_name = that.managed_entity.name;