1 // NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE:
3 // This file is generated automatically by the script
4 // "scripts/generate_client_js_actions.pl". See the documentation for
5 // SL/ClientJS.pm for instructions.
7 namespace("kivi", function(ns) {
8 ns.display_flash = function(type, message, noscroll) {
9 $('#flash_' + type + '_content').text(message);
10 $('#flash_' + type).show();
12 $('#frame-header')[0].scrollIntoView();
16 ns.display_flash_detail = function(type, message) {
17 $('#flash_' + type + '_detail').html(message);
18 $('#flash_' + type + '_disp').show();
21 ns.clear_flash = function(category , timeout) {
22 window.setTimeout(function(){
23 $('#flash_' + category).hide();
24 $('#flash_detail_' + category).hide();
25 $('#flash_' + category + '_disp').hide();
26 $('#flash_' + category + '_content').empty();
27 $('#flash_' + category + '_detail').empty();
31 ns.eval_json_result = function(data) {
36 return ns.display_flash('error', data.error);
38 if (!data.no_flash_clear) {
39 $(['info', 'warning', 'error']).each(function(idx, category) {
40 $('#flash_' + category).hide();
41 $('#flash_detail_' + category).hide();
42 $('#flash_' + category + '_disp').hide();
43 $('#flash_' + category + '_content').empty();
44 $('#flash_' + category + '_detail').empty();
47 if ((data.js || '') !== '')
52 if (data.eval_actions)
53 $(data.eval_actions).each(function(idx, action) {
54 // console.log("ACTION " + action[0] + " ON " + action[1]);
59 // console.log("current_content_type " + $('#current_content_type').val() + ' ID ' + $('#current_content_id').val());