summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Vobornik <pvoborni@redhat.com>2014-07-31 13:14:57 +0200
committerPetr Vobornik <pvoborni@redhat.com>2014-07-31 13:21:56 +0200
commitdedf88ad4a4a660817c833d66a7cf8e29049271c (patch)
tree012d67d49ebd6cb0c30abb87dabf17b47bc964b8
parentd56468ce64b3e951c6a4d128a11aae503f62aca8 (diff)
downloadfreeipa-dedf88ad4a4a660817c833d66a7cf8e29049271c.tar.gz
freeipa-dedf88ad4a4a660817c833d66a7cf8e29049271c.tar.xz
freeipa-dedf88ad4a4a660817c833d66a7cf8e29049271c.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.
-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 3d8177cd9..8d38df852 100644
--- a/install/ui/src/freeipa/otptoken.js
+++ b/install/ui/src/freeipa/otptoken.js
@@ -81,6 +81,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'
},
@@ -91,6 +92,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';