summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-07-31 13:14:57 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-08-21 14:10:35 +0200
commit9446c4c8b4bc397c6c2d1d94725f7aae4b123b5f (patch)
tree702fcacd79018e1042a32b32dd079212a0f81ebb /install
parentd138b44480dfef3220e0a39bef9c064a314ee6bf (diff)
downloadfreeipa-9446c4c8b4bc397c6c2d1d94725f7aae4b123b5f.tar.gz
freeipa-9446c4c8b4bc397c6c2d1d94725f7aae4b123b5f.tar.xz
freeipa-9446c4c8b4bc397c6c2d1d94725f7aae4b123b5f.zip
webui: disable batch action buttons by default
action buttons associated with batch actions were enabled by default, but they were disabled right after facet creation and a load of data. It caused a visual flicker. UX is enhanced by making them disabled by default. Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
Diffstat (limited to 'install')
-rw-r--r--install/ui/src/freeipa/association.js1
-rw-r--r--install/ui/src/freeipa/otptoken.js2
-rw-r--r--install/ui/src/freeipa/search.js3
3 files changed, 6 insertions, 0 deletions
diff --git a/install/ui/src/freeipa/association.js b/install/ui/src/freeipa/association.js
index 2a1072149..b78903ad7 100644
--- a/install/ui/src/freeipa/association.js
+++ b/install/ui/src/freeipa/association.js
@@ -868,6 +868,7 @@ exp.association_facet_pre_op = function(spec, context) {
hide_cond: ['read-only'],
show_cond: ['direct'],
enable_cond: ['item-selected'],
+ enabled: false,
handler: function(facet) {
facet.show_remove_dialog();
}
diff --git a/install/ui/src/freeipa/otptoken.js b/install/ui/src/freeipa/otptoken.js
index bc5607373..56c7684a0 100644
--- a/install/ui/src/freeipa/otptoken.js
+++ b/install/ui/src/freeipa/otptoken.js
@@ -78,6 +78,7 @@ return {
options: { ipatokendisabled: false },
needs_confirm: true,
enable_cond: ['item-selected'],
+ enabled: false,
success_msg: '@i18n:search.enabled',
confirm_msg: '@i18n:search.enable_confirm'
},
@@ -88,6 +89,7 @@ return {
options: { ipatokendisabled: true },
needs_confirm: true,
enable_cond: ['item-selected'],
+ enabled: false,
success_msg: '@i18n:search.disabled',
confirm_msg: '@i18n:search.disable_confirm'
},
diff --git a/install/ui/src/freeipa/search.js b/install/ui/src/freeipa/search.js
index 56afa0de9..834ff8a04 100644
--- a/install/ui/src/freeipa/search.js
+++ b/install/ui/src/freeipa/search.js
@@ -430,6 +430,7 @@ IPA.batch_remove_action = function(spec) {
spec.name = spec.name || 'remove';
spec.label = spec.label || '@i18n:buttons.remove';
spec.enable_cond = spec.enable_cond || ['item-selected'];
+ spec.enabled = spec.enabled === undefined ? false : spec.enabled;
spec.hide_cond = spec.hide_cond || ['self-service'];
var that = IPA.action(spec);
@@ -535,6 +536,7 @@ IPA.batch_disable_action = function(spec) {
spec.method = spec.method || 'disable';
spec.needs_confirm = spec.needs_confirm === undefined ? true : spec.needs_confirm;
spec.enable_cond = spec.enable_cond || ['item-selected'];
+ spec.enabled = spec.enabled === undefined ? false : spec.enabled;
spec.success_msg = spec.success_msg || '@i18n:search.disabled';
spec.confirm_msg = spec.confirm_msg || '@i18n:search.disable_confirm';
@@ -548,6 +550,7 @@ IPA.batch_enable_action = function(spec) {
spec.name = spec.name || 'enable';
spec.method = spec.method || 'enable';
spec.needs_confirm = spec.needs_confirm === undefined ? true : spec.needs_confirm;
+ spec.enabled = spec.enabled === undefined ? false : spec.enabled;
spec.enable_cond = spec.enable_cond || ['item-selected'];
spec.success_msg = spec.success_msg || '@i18n:search.enabled';
spec.confirm_msg = spec.confirm_msg || '@i18n:search.enable_confirm';