X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Fgenerate_client_js_actions.tpl;h=50a427c458964ff2c1decd910140a24fed5e2fbf;hb=07c884e5ac2318a9a67947faa88ecd1d4ca0629e;hp=b2ab0460cf9eba5f54bb048c580d962f92541aa8;hpb=88abef92ceaa2f2f297eb0b2a9a64418bed97ba7;p=kivitendo-erp.git diff --git a/scripts/generate_client_js_actions.tpl b/scripts/generate_client_js_actions.tpl index b2ab0460c..50a427c45 100644 --- a/scripts/generate_client_js_actions.tpl +++ b/scripts/generate_client_js_actions.tpl @@ -8,6 +8,12 @@ namespace("kivi", function(ns) { ns.display_flash = function(type, message) { $('#flash_' + type + '_content').text(message); $('#flash_' + type).show(); + $('#frame-header')[0].scrollIntoView(); +}; + +ns.display_flash_detail = function(type, message) { + $('#flash_' + type + '_detail').html(message); + $('#flash_' + type + '_disp').show(); }; ns.eval_json_result = function(data) { @@ -19,7 +25,10 @@ ns.eval_json_result = function(data) { $(['info', 'warning', 'error']).each(function(idx, category) { $('#flash_' + category).hide(); + $('#flash_detail_' + category).hide(); + $('#flash_' + category + '_disp').hide(); $('#flash_' + category + '_content').empty(); + $('#flash_' + category + '_detail').empty(); }); if ((data.js || '') != '') @@ -35,19 +44,6 @@ ns.eval_json_result = function(data) { // console.log("current_content_type " + $('#current_content_type').val() + ' ID ' + $('#current_content_id').val()); }; -ns.submit_ajax_form = function(url, form_selector, additional_data) { - var data = $(form_selector).serialize(); - if (additional_data) { - if (data) - data += '&'; - data += typeof additional_data == "string" ? additional_data : $(additional_data).serialize(); - } - - $.post(url, data, ns.eval_json_result); - - return true; -}; - }); // Local Variables: