From: Sven Schöling Date: Tue, 29 Jan 2019 10:07:14 +0000 (+0100) Subject: Order: second row javascript direkt indizieren. X-Git-Tag: release-3.5.4~135 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c1ca855e7bf0fb5cbc8fdac3589e6ca1822a3916;p=kivitendo-erp.git Order: second row javascript direkt indizieren. 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) --- 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 %]