X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/6ca2197818029fad5253edd8f08988ddc66aa359..6e1582b8d7511735d585d22680e94f7c1963105b:/scripts/generate_client_js_actions.tpl diff --git a/scripts/generate_client_js_actions.tpl b/scripts/generate_client_js_actions.tpl index 6572e22c3..7fa7baf95 100644 --- a/scripts/generate_client_js_actions.tpl +++ b/scripts/generate_client_js_actions.tpl @@ -4,10 +4,21 @@ // "scripts/generate_client_js_actions.pl". See the documentation for // SL/ClientJS.pm for instructions. +function display_flash(type, message) { + $('#flash_' + type + '_content').text(message); + $('#flash_' + type).show(); +} + function eval_json_result(data) { if (!data) return; + if (data.error) + return display_flash('error', data.error); + + $('#flash_error').hide(); + $('#flash_error_content').empty(); + if ((data.js || '') != '') eval(data.js); @@ -20,3 +31,7 @@ function eval_json_result(data) { // console.log("current_content_type " + $('#current_content_type').val() + ' ID ' + $('#current_content_id').val()); } + +// Local Variables: +// mode: js +// End: