From 0e92b99c50866eaeddd34138d6b3c1b31bff6f43 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Tue, 20 Jan 2015 16:35:06 +0100 Subject: [PATCH] Customer-autocomplete js im Presenter laden Im Gegensatz zu den Stellen in oe/do/ir/is (siehe Commit 65b7c724e) reicht es beim Bearbeiten von BDVs in den Stammdaten aus, den Autocomplete Code im Presenter zu laden, so wie dies auch beim PartPicker und Chartpicker gemacht wird. --- SL/CVar.pm | 3 --- SL/Presenter/CustomerVendor.pm | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/SL/CVar.pm b/SL/CVar.pm index 160a23e5a..f006fd9ca 100644 --- a/SL/CVar.pm +++ b/SL/CVar.pm @@ -301,9 +301,6 @@ sub render_inputs { $var->{VALID_BOX} = $form->parse_html_template('amcvar/render_checkboxes', { var => $var, %options }); } - # needed for customer_vendor_picker - $::request->{layout}->add_javascripts('autocomplete_customer.js'); - $main::lxdebug->leave_sub(2); } diff --git a/SL/Presenter/CustomerVendor.pm b/SL/Presenter/CustomerVendor.pm index 9045cda0c..a1aeee119 100644 --- a/SL/Presenter/CustomerVendor.pm +++ b/SL/Presenter/CustomerVendor.pm @@ -59,6 +59,7 @@ sub customer_vendor_picker { join('', map { $params{$_} ? $self->input_tag("", delete $params{$_}, id => "${id}_${_}", type => 'hidden') : '' } qw(type)) . $self->input_tag("", (ref $value && $value->can('name')) ? $value->name : '', id => "${id}_name", %params); + $::request->layout->add_javascripts('autocomplete_customer.js'); $::request->presenter->need_reinit_widgets($id); $self->html_tag('span', $ret, class => 'customer_vendor_picker'); -- 2.20.1