Revision cb604b36
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/Template/Plugin/L.pm | ||
---|---|---|
390 | 390 |
my $filter = ".filter(function(idx) { return this.substr(0, " . length($params{with}) . ") == '$params{with}'; })"; |
391 | 391 |
$filter .= ".map(function(idx, str) { return str.replace('$params{with}_', ''); })"; |
392 | 392 |
|
393 |
my $params_js = $params{params} ? qq| + ($params{params})| : ''; |
|
394 |
|
|
393 | 395 |
$stop_event = <<JAVASCRIPT; |
394 |
\$.post('$params{url}', { '${as}[]': \$(\$('${selector}').sortable('toArray'))${filter}.toArray() }); |
|
396 |
\$.post('$params{url}'${params_js}, { '${as}[]': \$(\$('${selector}').sortable('toArray'))${filter}.toArray() });
|
|
395 | 397 |
JAVASCRIPT |
396 | 398 |
} |
397 | 399 |
|
... | ... | |
733 | 735 |
recolor the children by setting the class C<listrow0> on odd and |
734 | 736 |
C<listrow1> on even entries. |
735 | 737 |
|
738 |
=item C<params> |
|
739 |
|
|
740 |
An optional JavaScript string that is evaluated before sending the |
|
741 |
POST request. The result must be a string that is appended to the URL. |
|
742 |
|
|
736 | 743 |
=back |
737 | 744 |
|
738 | 745 |
Example: |
Auch abrufbar als: Unified diff
L.sortable_element: beliebige POST-Parameter mit 'params' übergeben können