Revision 824f9ddf
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/ClientJS.pm | ||
---|---|---|
70 | 70 |
# Form Events |
71 | 71 |
focus => 1, |
72 | 72 |
|
73 |
# Generic Event Handling ## pattern: $(<TARGET>).<FUNCTION>(<ARG1>, kivi.get_function_by_name(<ARG2>)) |
|
74 |
on => 3, |
|
75 |
off => 3, |
|
76 |
one => 3, |
|
77 |
|
|
73 | 78 |
# ## jqModal plugin ## |
74 | 79 |
|
75 | 80 |
# Closing and removing the popup |
76 |
jqmClose => 1, |
|
81 |
jqmClose => 1, # $(<TARGET>).jqmClose()
|
|
77 | 82 |
|
78 | 83 |
# ## jstree plugin ## pattern: $.jstree._reference($(<TARGET>)).<FUNCTION>(<ARGS>) |
79 | 84 |
|
... | ... | |
464 | 469 |
|
465 | 470 |
C<focus> |
466 | 471 |
|
472 |
=item Generic Event Handlers |
|
473 |
|
|
474 |
C<on>, C<off>, C<one> |
|
475 |
|
|
476 |
These attach/detach event listeners to specific selectors. The first |
|
477 |
argument is the selector, the second the name of the events and the |
|
478 |
third argument is the name of the handler function. That function must |
|
479 |
already exist when the handler is added. |
|
480 |
|
|
467 | 481 |
=back |
468 | 482 |
|
469 | 483 |
=head2 JSTREE JQUERY PLUGIN |
js/client_js.js | ||
---|---|---|
86 | 86 |
// Form Events |
87 | 87 |
else if (action[0] == 'focus') $(action[1]).focus(); |
88 | 88 |
|
89 |
// Generic Event Handling ## |
|
90 |
else if (action[0] == 'on') $(action[1]).on(action[2], kivi.get_function_by_name(action[3])); |
|
91 |
else if (action[0] == 'off') $(action[1]).off(action[2], kivi.get_function_by_name(action[3])); |
|
92 |
else if (action[0] == 'one') $(action[1]).one(action[2], kivi.get_function_by_name(action[3])); |
|
93 |
|
|
89 | 94 |
// ## jqModal plugin ## |
90 | 95 |
|
91 | 96 |
// Closing and removing the popup |
Auch abrufbar als: Unified diff
ClientJS: Funktionen zum Hinzufügen und Entfernen generischer Eventhandler