Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 7328cbd6

Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt

  • ID 7328cbd6ab400a613f6c160beffbdb3abb44c8ad
  • Vorgänger 3c0769d8
  • Nachfolger 93be9aa2

Per default Drag&Drop nur auf Item mit Klasse 'dragdrop' zulassen

Unterschiede anzeigen:

SL/Template/Plugin/L.pm
438 438
JAVASCRIPT
439 439
  }
440 440

  
441
  $params{handle}     = '.dragdrop' unless exists $params{handle};
441 442
  $attributes{handle} = "'$params{handle}'" if $params{handle};
442 443

  
443 444
  my $attr_str = join(', ', map { "${_}: $attributes{$_}" } keys %attributes);
......
697 698
=item C<handle>
698 699

  
699 700
An optional jQuery selector specifying which part of the child element
700
is dragable. If nothing is given then the whole child element is
701
dragable, and clicks through to underlying elements like inputs or
702
links might not work.
701
is dragable. If the parameter is not given then it defaults to
702
C<.dragdrop> matching DOM elements with the class C<dragdrop>.  If the
703
parameter is set and empty then the whole child element is dragable,
704
and clicks through to underlying elements like inputs or links might
705
not work.
703 706

  
704 707
=item C<dont_recolor>
705 708

  
templates/webpages/am/edit_units.html
145 145

  
146 146
 </form>
147 147

  
148
 [% L.sortable_element('#unit_list tbody', 'url' => 'controller.pl?action=Unit/reorder', 'with' => 'unit_id', handle => '.dragdrop') %]
148
 [% L.sortable_element('#unit_list tbody', url => 'controller.pl?action=Unit/reorder', with => 'unit_id') %]
149 149

  
150 150
</body>
151 151
</html>
templates/webpages/am/list_price_factors.html
11 11

  
12 12
 <p>
13 13
  <table width="100%" id="price_factor_list">
14
   <thead>
14 15
   <tr class="listheading">
15 16
    <th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
16 17
    <th width="80%">[% 'Description' | $T8 %]</th>
17 18
    <th width="20%">[% 'Factor' | $T8 %]</th>
18 19
   </tr>
20
   </thead>
19 21

  
22
   <tbody>
20 23
   [% FOREACH factor = PRICE_FACTORS %]
21 24
   <tr class="listrow[% loop.count % 2 %]" id="price_factor_id_[% factor.id %]">
22 25
    <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
......
24 27
    <td>[% HTML.escape(factor.factor) %]</td>
25 28
   </tr>
26 29
   [% END %]
30
   </tbody>
27 31
  </table>
28 32
 </p>
29 33

  
......
38 42
  </form>
39 43
 </p>
40 44

  
41
 [% L.sortable_element('#price_factor_list tbody', 'url' => 'controller.pl?action=PriceFactor/reorder', 'with' => 'price_factor_id', handle => '.dragdrop') %]
45
 [% L.sortable_element('#price_factor_list tbody', url => 'controller.pl?action=PriceFactor/reorder', with => 'price_factor_id') %]
42 46

  
43 47
</body>
44 48
</html>
templates/webpages/am/list_warehouses.html
39 39
  </form>
40 40
 </p>
41 41

  
42
 [% L.sortable_element('#warehouse_list tbody', 'url' => 'controller.pl?action=Warehouse/reorder', 'with' => 'warehouse_id', handle => '.dragdrop') %]
42
 [% L.sortable_element('#warehouse_list tbody', url => 'controller.pl?action=Warehouse/reorder', with => 'warehouse_id') %]
43 43

  
44 44
</body>
45 45
</html>
templates/webpages/amcvar/list_cvar_configs.html
25 25

  
26 26
  <p>
27 27
   <table width="100%" id="cvarcfg_list">
28
    <thead>
28 29
    <tr class="listheading">
29 30
     <th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
30 31
     <th width="20%">[% 'Name' | $T8 %]</th>
......
36 37
     <th width="20%">[% 'Editable' | $T8 %]</th>
37 38
     [%- END %]
38 39
    </tr>
40
    </thead>
39 41

  
42
    <tbody>
40 43
    [%- FOREACH cfg = CONFIGS %]
41 44
    <tr class="listrow[% loop.count % 2 %]" id="cvarcfg_id_[% cfg.id %]">
42 45
     <td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
......
79 82
     [%- END %]
80 83
    </tr>
81 84
    [%- END %]
85
    </tbody>
82 86
   </table>
83 87
  </p>
84 88

  
......
89 93
  </p>
90 94
 </form>
91 95

  
92
 [% L.sortable_element('#cvarcfg_list tbody', 'url' => 'controller.pl?action=CustomVariableConfig/reorder', 'with' => 'cvarcfg_id', handle => '.dragdrop') %]
96
 [% L.sortable_element('#cvarcfg_list tbody', url => 'controller.pl?action=CustomVariableConfig/reorder', with => 'cvarcfg_id') %]
93 97

  
94 98
</body>
95 99
</html>

Auch abrufbar als: Unified diff