JAVASCRIPT
}
+ $params{handle} = '.dragdrop' unless exists $params{handle};
$attributes{handle} = "'$params{handle}'" if $params{handle};
my $attr_str = join(', ', map { "${_}: $attributes{$_}" } keys %attributes);
=item C<handle>
An optional jQuery selector specifying which part of the child element
-is dragable. If nothing is given then the whole child element is
-dragable, and clicks through to underlying elements like inputs or
-links might not work.
+is dragable. If the parameter is not given then it defaults to
+C<.dragdrop> matching DOM elements with the class C<dragdrop>. If the
+parameter is set and empty then the whole child element is dragable,
+and clicks through to underlying elements like inputs or links might
+not work.
=item C<dont_recolor>
</form>
- [% L.sortable_element('#unit_list tbody', 'url' => 'controller.pl?action=Unit/reorder', 'with' => 'unit_id', handle => '.dragdrop') %]
+ [% L.sortable_element('#unit_list tbody', url => 'controller.pl?action=Unit/reorder', with => 'unit_id') %]
</body>
</html>
<p>
<table width="100%" id="price_factor_list">
+ <thead>
<tr class="listheading">
<th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
<th width="80%">[% 'Description' | $T8 %]</th>
<th width="20%">[% 'Factor' | $T8 %]</th>
</tr>
+ </thead>
+ <tbody>
[% FOREACH factor = PRICE_FACTORS %]
<tr class="listrow[% loop.count % 2 %]" id="price_factor_id_[% factor.id %]">
<td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
<td>[% HTML.escape(factor.factor) %]</td>
</tr>
[% END %]
+ </tbody>
</table>
</p>
</form>
</p>
- [% L.sortable_element('#price_factor_list tbody', 'url' => 'controller.pl?action=PriceFactor/reorder', 'with' => 'price_factor_id', handle => '.dragdrop') %]
+ [% L.sortable_element('#price_factor_list tbody', url => 'controller.pl?action=PriceFactor/reorder', with => 'price_factor_id') %]
</body>
</html>
</form>
</p>
- [% L.sortable_element('#warehouse_list tbody', 'url' => 'controller.pl?action=Warehouse/reorder', 'with' => 'warehouse_id', handle => '.dragdrop') %]
+ [% L.sortable_element('#warehouse_list tbody', url => 'controller.pl?action=Warehouse/reorder', with => 'warehouse_id') %]
</body>
</html>
<p>
<table width="100%" id="cvarcfg_list">
+ <thead>
<tr class="listheading">
<th align="center"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></th>
<th width="20%">[% 'Name' | $T8 %]</th>
<th width="20%">[% 'Editable' | $T8 %]</th>
[%- END %]
</tr>
+ </thead>
+ <tbody>
[%- FOREACH cfg = CONFIGS %]
<tr class="listrow[% loop.count % 2 %]" id="cvarcfg_id_[% cfg.id %]">
<td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8('reorder item') %]"></td>
[%- END %]
</tr>
[%- END %]
+ </tbody>
</table>
</p>
</p>
</form>
- [% L.sortable_element('#cvarcfg_list tbody', 'url' => 'controller.pl?action=CustomVariableConfig/reorder', 'with' => 'cvarcfg_id', handle => '.dragdrop') %]
+ [% L.sortable_element('#cvarcfg_list tbody', url => 'controller.pl?action=CustomVariableConfig/reorder', with => 'cvarcfg_id') %]
</body>
</html>