Revision 59da90f6
Von Bernd Bleßmann vor etwa 8 Jahren hinzugefügt
templates/webpages/order/tabs/basic_data.html | ||
---|---|---|
154 | 154 |
<thead> |
155 | 155 |
<tr class="listheading"> |
156 | 156 |
<th class="listheading" style='display:none'></th> |
157 |
<th class="listheading" nowrap width="3" >[%- 'position' | $T8 %] </th> |
|
157 | 158 |
<th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th> |
158 | 159 |
<th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th> |
159 | 160 |
<th class="listheading" nowrap width="15">[%- 'Partnumber' | $T8 %] </th> |
... | ... | |
334 | 335 |
var row = $(clicked).parents("tbody").first(); |
335 | 336 |
$(row).remove(); |
336 | 337 |
|
338 |
renumber_positions(); |
|
337 | 339 |
recalc_amounts_and_taxes(); |
338 | 340 |
} |
339 | 341 |
|
... | ... | |
515 | 517 |
email_dialog.dialog("close"); |
516 | 518 |
} |
517 | 519 |
|
520 |
function renumber_positions() { |
|
521 |
$('.row_entry [name="position"]').each(function(idx, elt) { |
|
522 |
$(elt).html(idx+1); |
|
523 |
}); |
|
524 |
} |
|
525 |
|
|
518 | 526 |
|
519 | 527 |
$(function(){ |
520 | 528 |
$('#order_[%- cv_id %]').change(reload_cv_dependend_selections); |
... | ... | |
539 | 547 |
set_unit_change_with_oldval($('.unitselect')); |
540 | 548 |
}); |
541 | 549 |
|
550 |
$('#row_table_id').on('sortstop', function(event, ui) { |
|
551 |
renumber_positions(); |
|
552 |
}); |
|
542 | 553 |
</script> |
Auch abrufbar als: Unified diff
Auftrags-Controller: Positions-Spalte anzeigen und renummerieren bei Änderungen.