From: G. Richardson Date: Tue, 20 Jan 2015 15:35:06 +0000 (+0100) Subject: Customer-autocomplete js im Presenter laden X-Git-Tag: release-3.2.0beta~64 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=0e92b99c50866eaeddd34138d6b3c1b31bff6f43;p=kivitendo-erp.git 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. --- 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');