Revision fded0cc6
Von Sven Schöling vor etwa 7 Jahren hinzugefügt
js/kivi.Part.js | ||
---|---|---|
744 | 744 |
if (!$(elt).data('part_picker')) |
745 | 745 |
$(elt).data('part_picker', new kivi.Part.Picker($(elt))); |
746 | 746 |
}); |
747 |
|
|
748 |
kivi.run_once_for('#customerprice_rows', 'customerprice_row_sort_renumber', function(elt) { |
|
749 |
$(elt).on('sortstop', kivi.Part.customerprice_renumber_positions); |
|
750 |
}); |
|
751 |
|
|
752 |
kivi.run_once_for('#makemodel_rows', 'makemodel_row_sort_renumber', function(elt) { |
|
753 |
$(elt).on('sortstop', kivi.Part.makemodel_renumber_positions); |
|
754 |
}); |
|
747 | 755 |
} |
748 | 756 |
|
749 | 757 |
ns.init = function() { |
templates/webpages/part/_customerprices.html | ||
---|---|---|
38 | 38 |
</td> |
39 | 39 |
</tr> |
40 | 40 |
[% L.sortable_element('#customerprice_rows') %] |
41 |
|
|
42 |
<script type="text/javascript"> |
|
43 |
$(function() { |
|
44 |
|
|
45 |
$('#customerprice_rows').on('sortstop', function(event, ui) { |
|
46 |
kivi.Part.customerprice_renumber_positions(); |
|
47 |
}); |
|
48 |
|
|
49 |
}) |
|
50 |
</script> |
templates/webpages/part/_makemodel.html | ||
---|---|---|
39 | 39 |
</td> |
40 | 40 |
</tr> |
41 | 41 |
[% L.sortable_element('#makemodel_rows') %] |
42 |
|
|
43 |
<script type="text/javascript"> |
|
44 |
$(function() { |
|
45 |
|
|
46 |
$('#makemodel_rows').on('sortstop', function(event, ui) { |
|
47 |
kivi.Part.makemodel_renumber_positions(); |
|
48 |
}); |
|
49 |
|
|
50 |
}) |
|
51 |
</script> |
Auch abrufbar als: Unified diff
Part: Javascripte nicht ins HTML schreiben sondern nach reinit_widgets