diff options
author | Petr Vobornik <pvoborni@redhat.com> | 2012-09-03 16:43:13 +0200 |
---|---|---|
committer | Petr Vobornik <pvoborni@redhat.com> | 2012-09-06 17:36:29 +0200 |
commit | 835c7859c5c31807b9f46cf79462459238571f5e (patch) | |
tree | f6c338cc023d95bb80057de46b71fbddedfcd561 /install/ui/details.js | |
parent | a01fbb91e88918ead456ae85e886e975f29dc1be (diff) | |
download | freeipa-835c7859c5c31807b9f46cf79462459238571f5e.tar.gz freeipa-835c7859c5c31807b9f46cf79462459238571f5e.tar.xz freeipa-835c7859c5c31807b9f46cf79462459238571f5e.zip |
Update of confirmation of actions
This patch is changing confirmation of actions according to ticket #3035, see the ticket description.
It does following changes:
* Confirmation of update action was removed.
* Action lists resets to first action (which is usually a NOP: '-- select action --') on change of displayed entry.
* New confirmation dialog was implemented. It is used for action confirmation. It is used in IPA.action to replace the call of window.confirm(message). The old call is a modal window which blocks all JS functionality and has different style than other dialogs in Web UI. The new one has same design and doesn't block background operations.
https://fedorahosted.org/freeipa/ticket/3035
Diffstat (limited to 'install/ui/details.js')
-rw-r--r-- | install/ui/details.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/install/ui/details.js b/install/ui/details.js index f038daa67..c3e84e434 100644 --- a/install/ui/details.js +++ b/install/ui/details.js @@ -918,7 +918,7 @@ IPA.update_action = function(spec) { spec = spec || {}; spec.name = spec.name || 'update'; spec.label = spec.label || IPA.messages.buttons.update; - spec.needs_confirm = spec.needs_confirm !== undefined ? spec.needs_confirm : true; + spec.needs_confirm = spec.needs_confirm !== undefined ? spec.needs_confirm : false; spec.enable_cond = spec.enable_cond || ['dirty']; var that = IPA.action(spec); @@ -1120,8 +1120,6 @@ IPA.object_action = function(spec) { var entity_name = facet.entity.name; var pkey = IPA.nav.get_state(entity_name+'-pkey'); - if (that.needs_confirm && !that.confirm_object(pkey)) return; - IPA.command({ entity: entity_name, method: that.method, @@ -1155,9 +1153,10 @@ IPA.object_action = function(spec) { }; }; - that.confirm_object = function(obj_name) { - var msg = that.confirm_msg.replace('${object}', obj_name); - return IPA.confirm(msg); + that.get_confirm_message = function(facet) { + var pkey = IPA.nav.get_state(facet.entity.name+'-pkey'); + var msg = that.confirm_msg.replace('${object}', pkey); + return msg; }; that.object_execute_action = that.execute_action; |