mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
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>
This commit is contained in:
parent
d138b44480
commit
9446c4c8b4
@ -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();
|
||||
}
|
||||
|
@ -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'
|
||||
},
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user