From: Bernd Bleßmann Date: Mon, 19 Jan 2015 09:51:02 +0000 (+0100) Subject: customer_vendor_picker bei CVars und Summen- und Saldenliste X-Git-Tag: release-3.2.0beta~71 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=65b7c724e;p=kivitendo-erp.git customer_vendor_picker bei CVars und Summen- und Saldenliste - nicht mehr vorhandenen customer_picker durch customer_vendor_picker ersetzt - vendor_selector durch customer_vendor_picker ersetzt - autocomplete_customer.js laden --- diff --git a/SL/CVar.pm b/SL/CVar.pm index f006fd9ca..160a23e5a 100644 --- a/SL/CVar.pm +++ b/SL/CVar.pm @@ -301,6 +301,9 @@ 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/bin/mozilla/do.pl b/bin/mozilla/do.pl index 9bca5a785..b8cd626bc 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -323,7 +323,7 @@ sub form_header { $form->{follow_up_trans_info} = $form->{donumber} .'('. $follow_up_vc .')'; - $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io)); + $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer)); $form->header(); # Fix für Bug 1082 Erwartet wird: 'abteilungsNAME--abteilungsID' diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 303eae069..e71a6dace 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -337,7 +337,7 @@ sub form_header { ), @custom_hiddens, map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}]; - $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io)); + $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer)); $form->header(); diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 3ecc93054..fe561cc5e 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -385,7 +385,7 @@ sub form_header { ), @custom_hiddens, map { $_.'_rate', $_.'_description', $_.'_taxnumber' } split / /, $form->{taxaccounts}]; - $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io)); + $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer)); $form->header(); diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 4c640d3ac..faa9d3a70 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -465,7 +465,7 @@ sub form_header { } } - $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase show_form_details show_history show_vc_details ckeditor/ckeditor ckeditor/adapters/jquery kivi.io)); + $::request->{layout}->use_javascript(map { "${_}.js" } qw(kivi.SalesPurchase show_form_details show_history show_vc_details ckeditor/ckeditor ckeditor/adapters/jquery kivi.io autocomplete_customer)); $form->header; if ($form->{CFDD_shipto} && $form->{CFDD_shipto_id} ) { diff --git a/templates/webpages/amcvar/render_inputs.html b/templates/webpages/amcvar/render_inputs.html index d8d2ac96d..59021cd3c 100644 --- a/templates/webpages/amcvar/render_inputs.html +++ b/templates/webpages/amcvar/render_inputs.html @@ -25,10 +25,10 @@ [%- ELSIF var.type == 'customer' %] -[% L.customer_picker(var_name, var.value) %] +[% L.customer_vendor_picker(var_name, var.value, type='customer') %] [%- ELSIF var.type == 'vendor' %] -[% L.vendor_selector(var_name, var.value) %] +[% L.customer_vendor_picker(var_name, var.value, type='vendor') %] [%- ELSIF var.type == 'part' %] [% L.part_selector(var_name, var.value) %] diff --git a/templates/webpages/amcvar/render_inputs_block.html b/templates/webpages/amcvar/render_inputs_block.html index eaeed6d76..3141a5a11 100644 --- a/templates/webpages/amcvar/render_inputs_block.html +++ b/templates/webpages/amcvar/render_inputs_block.html @@ -54,10 +54,12 @@ [%- ELSIF cvar.var.type == 'customer' %] -[%- L.customer_picker(cvar_tag_name, cvar.value, render_cvar_tag_options) %] +[%- render_cvar_tag_options.type = 'customer' %] +[%- L.customer_vendor_picker(cvar_tag_name, cvar.value, render_cvar_tag_options) %] [%- ELSIF cvar.var.type == 'vendor' %] -[% L.vendor_selector(cvar_tag_name, cvar.value, render_cvar_tag_options) %] +[%- render_cvar_tag_options.type = 'vendor' %] +[%- L.customer_vendor_picker(cvar_tag_name, cvar.value, render_cvar_tag_options) %] [%- ELSIF cvar.var.type == 'part' %] [% L.part_selector(cvar_tag_name, cvar.value, render_cvar_tag_options) %] diff --git a/templates/webpages/rp/report.html b/templates/webpages/rp/report.html index 39931075a..1daba782a 100644 --- a/templates/webpages/rp/report.html +++ b/templates/webpages/rp/report.html @@ -70,7 +70,7 @@ [%- BLOCK customer %] [% 'Customer' | $T8 %] - [% L.customer_picker('customer_id') %] + [% L.customer_vendor_picker('customer_id', '', type='customer') %] [%- END %] [%- BLOCK projectnumber %]