From: Moritz Bunkus Date: Wed, 13 Mar 2013 14:40:25 +0000 (+0100) Subject: ClientJS: alle Flash-Kategorien nach nächstem Standard-AJAX-Call leeren X-Git-Tag: release-3.1.0beta1~519 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f509d946cb89ef9870c6d89627ec56ad9fa4c480;p=kivitendo-erp.git ClientJS: alle Flash-Kategorien nach nächstem Standard-AJAX-Call leeren --- diff --git a/js/client_js.js b/js/client_js.js index 11ef823e1..d153b5330 100644 --- a/js/client_js.js +++ b/js/client_js.js @@ -16,8 +16,10 @@ function eval_json_result(data) { if (data.error) return display_flash('error', data.error); - $('#flash_error').hide(); - $('#flash_error_content').empty(); + $(['info', 'warning', 'error']).each(function(idx, category) { + $('#flash_' + category).hide(); + $('#flash_' + category + '_content').empty(); + }); if ((data.js || '') != '') eval(data.js); diff --git a/scripts/generate_client_js_actions.tpl b/scripts/generate_client_js_actions.tpl index 55206ea6a..46032667f 100644 --- a/scripts/generate_client_js_actions.tpl +++ b/scripts/generate_client_js_actions.tpl @@ -16,8 +16,10 @@ function eval_json_result(data) { if (data.error) return display_flash('error', data.error); - $('#flash_error').hide(); - $('#flash_error_content').empty(); + $(['info', 'warning', 'error']).each(function(idx, category) { + $('#flash_' + category).hide(); + $('#flash_' + category + '_content').empty(); + }); if ((data.js || '') != '') eval(data.js);