From 2ccc4465e5c5288db58608966d6b1167111c9964 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 25 Apr 2011 12:15:05 +0000 Subject: [PATCH] for select-all, show regular confirmation message plus select-all hint --- etemplate/js/nextmatch_action.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etemplate/js/nextmatch_action.js b/etemplate/js/nextmatch_action.js index 67fe205b75..114551b079 100644 --- a/etemplate/js/nextmatch_action.js +++ b/etemplate/js/nextmatch_action.js @@ -103,14 +103,14 @@ function nm_action(_action, _senders) //console.log(_action); console.log(_senders); var select_all = document.getElementById('exec[nm][select_all]'); + var confirm_msg = (_senders.length > 1 || select_all && select_all.value) && + typeof _action.data.confirm_multiple != 'undefined' ? + _action.data.confirm_multiple : _action.data.confirm; // let user confirm the action first (if not select_all set and nm_action == 'submit' --> confirmed later) if (!(select_all && select_all.value && _action.data.nm_action == 'submit') && typeof _action.data.confirm != 'undefined') { - var confirm_msg = _senders.length > 1 && typeof _action.data.confirm_multiple != 'undefined' ? - _action.data.confirm_multiple : _action.data.confirm; - if (!confirm(confirm_msg)) return; } @@ -144,7 +144,7 @@ function nm_action(_action, _senders) // let user confirm select-all if (select_all && select_all.value) { - if (!confirm(select_all.value)) return; + if (!confirm(confirm_msg+"\n\n"+select_all.value)) return; } var form = document.getElementsByName("eTemplate")[0]; document.getElementById('exec[nm][action]').value = _action.id;