From fded0cc6dab294c2d3cf60011758f1af3d7b4357 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 8 Jan 2018 16:26:15 +0100 Subject: [PATCH] Part: Javascripte nicht ins HTML schreiben sondern nach reinit_widgets --- js/kivi.Part.js | 8 ++++++++ templates/webpages/part/_customerprices.html | 10 ---------- templates/webpages/part/_makemodel.html | 10 ---------- 3 files changed, 8 insertions(+), 20 deletions(-) diff --git a/js/kivi.Part.js b/js/kivi.Part.js index bf35cb874..7680551b8 100644 --- a/js/kivi.Part.js +++ b/js/kivi.Part.js @@ -744,6 +744,14 @@ namespace('kivi.Part', function(ns) { 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() { diff --git a/templates/webpages/part/_customerprices.html b/templates/webpages/part/_customerprices.html index 9384a6c8f..49f32c328 100644 --- a/templates/webpages/part/_customerprices.html +++ b/templates/webpages/part/_customerprices.html @@ -38,13 +38,3 @@ [% L.sortable_element('#customerprice_rows') %] - - diff --git a/templates/webpages/part/_makemodel.html b/templates/webpages/part/_makemodel.html index 71fce5a7d..e56a886a9 100644 --- a/templates/webpages/part/_makemodel.html +++ b/templates/webpages/part/_makemodel.html @@ -39,13 +39,3 @@ [% L.sortable_element('#makemodel_rows') %] - - -- 2.20.1