Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 40fc1b5c

Von Martin Helmling martin.helmling@octosoft.eu vor etwa 8 Jahren hinzugefügt

  • ID 40fc1b5c157cea8cedea29ba152c0a42e54a3698
  • Vorgänger ea4101ec
  • Nachfolger c55ef764

Automatisches Löschen von Flashanzeige unterdrückbar(2)

Nun mit angepasstem Template und SL/ClientJS.pm

Unterschiede anzeigen:

SL/ClientJS.pm
116 116

  
117 117
  flash                  => 2,  # kivi.display_flash(<TARGET>, <ARGS>)
118 118
  flash_detail           => 2,  # kivi.display_flash_detail(<TARGET>, <ARGS>)
119
  clear_flash            => 2,  # kivi.display_flash_detail(<TARGET>, <ARGS>)
119
  clear_flash            => 2,  # kivi.clear_flash(<TARGET>, <ARGS>)
120 120
  reinit_widgets         => 0,  # kivi.reinit_widgets()
121 121
  run                    => -1, # kivi.run(<TARGET>, <ARGS>)
122 122
  run_once_for           => 3,  # kivi.run_once_for(<TARGET>, <ARGS>)
js/client_js.js
35 35
  if (data.error)
36 36
    return ns.display_flash('error', data.error);
37 37

  
38
  $(['info', 'warning', 'error']).each(function(idx, category) {
39
    $('#flash_' + category).hide();
40
    $('#flash_detail_' + category).hide();
41
    $('#flash_' + category + '_disp').hide();
42
    $('#flash_' + category + '_content').empty();
43
    $('#flash_' + category + '_detail').empty();
44
  });
45

  
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();
45
    });
46
  }
46 47
  if ((data.js || '') != '')
47 48
    eval(data.js);
48 49

  
......
150 151
      else if (action[0] == 'redirect_to')          window.location.href = action[1];
151 152
      else if (action[0] == 'flash')                kivi.display_flash(action[1], action[2]);
152 153
      else if (action[0] == 'flash_detail')         kivi.display_flash_detail(action[1], action[2]);
153
      else if (action[0] == 'clear_flash')          kivi.display_flash_detail(action[1], action[2]);
154
      else if (action[0] == 'clear_flash')          kivi.clear_flash(action[1], action[2]);
154 155
      else if (action[0] == 'reinit_widgets')       kivi.reinit_widgets();
155 156
      else if (action[0] == 'run')                  kivi.run(action[1], action.slice(2, action.length));
156 157
      else if (action[0] == 'run_once_for')         kivi.run_once_for(action[1], action[2], action[3]);
scripts/generate_client_js_actions.tpl
35 35
  if (data.error)
36 36
    return ns.display_flash('error', data.error);
37 37

  
38
  $(['info', 'warning', 'error']).each(function(idx, category) {
39
    $('#flash_' + category).hide();
40
    $('#flash_detail_' + category).hide();
41
    $('#flash_' + category + '_disp').hide();
42
    $('#flash_' + category + '_content').empty();
43
    $('#flash_' + category + '_detail').empty();
44
  });
45

  
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();
45
    });
46
  }
46 47
  if ((data.js || '') != '')
47 48
    eval(data.js);
48 49

  

Auch abrufbar als: Unified diff