if (!$(elt).data('part_picker'))
$(elt).data('part_picker', new kivi.Part.Picker($(elt)));
});
+
+ kivi.run_once_for('#customerprice_rows', 'customerprice_row_sort_renumber', function(elt) {
+ $(elt).on('sortstop', kivi.Part.customerprice_renumber_positions);
+ });
+
+ kivi.run_once_for('#makemodel_rows', 'makemodel_row_sort_renumber', function(elt) {
+ $(elt).on('sortstop', kivi.Part.makemodel_renumber_positions);
+ });
}
ns.init = function() {
</td>
</tr>
[% L.sortable_element('#customerprice_rows') %]
-
- <script type="text/javascript">
- $(function() {
-
- $('#customerprice_rows').on('sortstop', function(event, ui) {
- kivi.Part.customerprice_renumber_positions();
- });
-
- })
- </script>
</td>
</tr>
[% L.sortable_element('#makemodel_rows') %]
-
- <script type="text/javascript">
- $(function() {
-
- $('#makemodel_rows').on('sortstop', function(event, ui) {
- kivi.Part.makemodel_renumber_positions();
- });
-
- })
- </script>