From: Sven Schöling Date: Thu, 13 Oct 2016 12:07:20 +0000 (+0200) Subject: ActionBar: check confirm after checks X-Git-Tag: release-3.5.4~1412 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=80f2a2f4bd66023134725c75b196492bde46a170;p=kivitendo-erp.git ActionBar: check confirm after checks So muss im Falle dass checks meckern nicht doppelt bestätigt werden --- diff --git a/js/kivi.ActionBar.js b/js/kivi.ActionBar.js index 6e7cc165b..44f0d6efe 100644 --- a/js/kivi.ActionBar.js +++ b/js/kivi.ActionBar.js @@ -13,7 +13,6 @@ namespace('kivi', function(k){ $(e).click(function(event) { var $hidden, key, func, check; if (data.disabled) return; - if (data.confirm && !confirm(data.confirm)) return; if (data.checks) { for (var i=0; i < data.checks.length; i++) { check = data.checks[i]; @@ -22,6 +21,7 @@ namespace('kivi', function(k){ if (!func()) return; } } + if (data.confirm && !confirm(data.confirm)) return; for (key in params) { $hidden = $('') $hidden.attr('name', key) @@ -35,7 +35,6 @@ namespace('kivi', function(k){ $(e).click(function(event) { var func; if (data.disabled) return; - if (data.confirm && !confirm(data.confirm)) return; if (data.checks) { for (var i=0; i < data.checks.length; i++) { check = data.checks[i]; @@ -44,6 +43,7 @@ namespace('kivi', function(k){ if (!func()) return; } } + if (data.confirm && !confirm(data.confirm)) return; func = kivi.get_function_by_name(data.function[0]); func.apply(document, data.function.slice(1)) });