X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Fgenerate_client_js_actions.tpl;h=a29b3258785ef7874d651c157f9703ded212e894;hb=201c9038c6c64d91b9be59991b6b6449c33a0d4f;hp=50a427c458964ff2c1decd910140a24fed5e2fbf;hpb=5bc3c720b5c6f422ca3fa63d6d400d3a46fd633d;p=kivitendo-erp.git diff --git a/scripts/generate_client_js_actions.tpl b/scripts/generate_client_js_actions.tpl index 50a427c45..a29b32587 100644 --- a/scripts/generate_client_js_actions.tpl +++ b/scripts/generate_client_js_actions.tpl @@ -5,10 +5,12 @@ // SL/ClientJS.pm for instructions. namespace("kivi", function(ns) { -ns.display_flash = function(type, message) { +ns.display_flash = function(type, message, noscroll) { $('#flash_' + type + '_content').text(message); $('#flash_' + type).show(); - $('#frame-header')[0].scrollIntoView(); + if (!noscroll) { + $('#frame-header')[0].scrollIntoView(); + } }; ns.display_flash_detail = function(type, message) { @@ -16,6 +18,16 @@ ns.display_flash_detail = function(type, message) { $('#flash_' + type + '_disp').show(); }; +ns.clear_flash = function(category , timeout) { + window.setTimeout(function(){ + $('#flash_' + category).hide(); + $('#flash_detail_' + category).hide(); + $('#flash_' + category + '_disp').hide(); + $('#flash_' + category + '_content').empty(); + $('#flash_' + category + '_detail').empty(); + }, timeout); +}; + ns.eval_json_result = function(data) { if (!data) return;