Revision a82f3bef
Von Moritz Bunkus vor etwa 11 Jahren hinzugefügt
js/client_js.js | ||
---|---|---|
29 | 29 |
$(data.eval_actions).each(function(idx, action) { |
30 | 30 |
// console.log("ACTION " + action[0] + " ON " + action[1]); |
31 | 31 |
|
32 |
// ## Non-jQuery methods ## |
|
33 |
if (action[0] == 'flash') kivi.display_flash(action[1], action[2]); |
|
34 |
|
|
35 | 32 |
// ## jQuery basics ## |
36 |
|
|
37 | 33 |
// Basic effects |
38 |
else if (action[0] == 'hide') $(action[1]).hide();
|
|
34 |
if (action[0] == 'hide') $(action[1]).hide();
|
|
39 | 35 |
else if (action[0] == 'show') $(action[1]).show(); |
40 | 36 |
else if (action[0] == 'toggle') $(action[1]).toggle(); |
41 | 37 |
|
... | ... | |
127 | 123 |
|
128 | 124 |
// ## other stuff ## |
129 | 125 |
else if (action[0] == 'redirect_to') window.location.href = action[1]; |
126 |
else if (action[0] == 'flash') kivi.display_flash(action[1], action[2]); |
|
130 | 127 |
else if (action[0] == 'reinit_widgets') kivi.reinit_widgets(); |
128 |
else if (action[0] == 'run') kivi.run(action[1], action.slice(2, action.length)); |
|
129 |
else if (action[0] == 'run_once_for') kivi.run_once_for(action[1], action[2], action[3]); |
|
131 | 130 |
|
132 | 131 |
else console.log('Unknown action: ' + action[0]); |
133 | 132 |
|
Auch abrufbar als: Unified diff
ClientJS: neue Funktionen "run()", "run_once_for()"; Dokumentation