Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 58cc1c78

Von Tamino vor mehr als 4 Jahren hinzugefügt

  • ID 58cc1c783faf8bfb79a3be0a4cb6746a6b7c5e22
  • Vorgänger 54167612
  • Nachfolger 369bdbe3

Hinzufügen der Option ajax_return zu L.sortable_element

Unterschiede anzeigen:

SL/Template/Plugin/L.pm
304 304
    $filter    .= ".map(function(idx, str) { return str.replace('$params{with}_', ''); })";
305 305

  
306 306
    my $params_js = $params{params} ? qq| + ($params{params})| : '';
307
    my $ajax_return = '';
308
    if ($params{ajax_return}) {
309
      $ajax_return = 'kivi.eval_json_result';
310
    }
307 311

  
308 312
    $stop_event = <<JAVASCRIPT;
309
        \$.post('$params{url}'${params_js}, { '${as}[]': \$(\$('${selector}').sortable('toArray'))${filter}.toArray() });
313
        \$.post('$params{url}'${params_js}, { '${as}[]': \$(\$('${selector}').sortable('toArray'))${filter}.toArray() }, $ajax_return);
310 314
JAVASCRIPT
311 315
  }
312 316

  
......
566 570
=item C<url>
567 571

  
568 572
The URL to POST an AJAX request to after a dragged element has been
569
dropped. The AJAX request's return value is ignored. If given then
573
dropped. The AJAX request's return value is ignored by default. If given then
570 574
C<$params{with}> must be given as well.
571 575

  
576
=item C<ajax_return>
577

  
578
If trueish then the AJAX request's return is accepted.
579

  
572 580
=item C<with>
573 581

  
574 582
A string that is interpreted as the prefix of the children's ID. Upon

Auch abrufbar als: Unified diff