From c1ca855e7bf0fb5cbc8fdac3589e6ca1822a3916 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 29 Jan 2019 11:07:14 +0100 Subject: [PATCH] Order: second row javascript direkt indizieren. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Beschleunigt das Nachladen der zweiten Zeile bei großen Aufträgen (100+ Zeilen), weil der client weit weniger DOM selectors auswerten muss. (cherry picked from commit 87ca139b2162813d71dec8e4e8ecef21588c818d) --- SL/Controller/Order.pm | 4 ++-- templates/webpages/order/tabs/_row.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/Controller/Order.pm b/SL/Controller/Order.pm index d461400b8..91cdebba6 100644 --- a/SL/Controller/Order.pm +++ b/SL/Controller/Order.pm @@ -981,8 +981,8 @@ sub js_load_second_row { my $row_as_html = $self->p->render('order/tabs/_second_row', ITEM => $item, TYPE => $self->type); $self->js - ->html('.row_entry:has(#item_' . $item_id . ') [name = "second_row"]', $row_as_html) - ->data('.row_entry:has(#item_' . $item_id . ') [name = "second_row"]', 'loaded', 1); + ->html('#second_row_' . $item_id, $row_as_html) + ->data('#second_row_' . $item_id, 'loaded', 1); } sub js_redisplay_line_values { diff --git a/templates/webpages/order/tabs/_row.html b/templates/webpages/order/tabs/_row.html index 967c94ba9..f31abc725 100644 --- a/templates/webpages/order/tabs/_row.html +++ b/templates/webpages/order/tabs/_row.html @@ -131,7 +131,7 @@ [%- PROCESS order/tabs/_second_row.html ITEM=ITEM TYPE=TYPE %] [%- ELSE %] -
+
[%- LxERP.t8("Loading...") %]
[%- END %] -- 2.20.1