]> wagnertech.de Git - kivitendo-erp.git/commitdiff
ClientJS: alle Flash-Kategorien nach nächstem Standard-AJAX-Call leeren
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 13 Mar 2013 14:40:25 +0000 (15:40 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 13 Mar 2013 16:56:55 +0000 (17:56 +0100)
js/client_js.js
scripts/generate_client_js_actions.tpl

index 11ef823e11facce0c93383c3b43f1dd9ab9a6ad5..d153b533040a61c6210d18bc7bce81b1a341a09b 100644 (file)
@@ -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);
index 55206ea6ac27d8a69536d7b58bc1921c093c3303..46032667f17927cf0ae16f09a3e24ae0ab8c8bd1 100644 (file)
@@ -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);