From: Thomas Heck Date: Tue, 16 Jul 2013 08:09:51 +0000 (+0200) Subject: CustomerVendor: namespace-Aufrufe entfernt X-Git-Tag: release-3.1.0beta1~161^2~9 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=95c1acfeb2631a78df6c0cec37649d68657fba04;p=kivitendo-erp.git CustomerVendor: namespace-Aufrufe entfernt --- diff --git a/SL/Controller/CustomerVendor.pm b/SL/Controller/CustomerVendor.pm index 79379494a..cfe7accf8 100644 --- a/SL/Controller/CustomerVendor.pm +++ b/SL/Controller/CustomerVendor.pm @@ -732,7 +732,7 @@ sub _pre_render { WHERE salesman'; my $business_ids = [ map( - { $_->{id} } + { $_->{id}; } selectall_hashref_query($::form, $dbh, $query) ) ]; @@ -771,6 +771,7 @@ sub _pre_render { $self->{template_args} ||= {}; $::request->{layout}->add_javascripts('autocomplete_customer.js'); + $::request->{layout}->add_javascripts('kivi.CustomerVendor.js'); } 1; diff --git a/js/kivi.CustomerVendor.js b/js/kivi.CustomerVendor.js index 134efb492..928c6736c 100644 --- a/js/kivi.CustomerVendor.js +++ b/js/kivi.CustomerVendor.js @@ -1,7 +1,5 @@ namespace('kivi.CustomerVendor', function(ns) { - var kivi = namespace('kivi'); - this.selectShipto = function(params) { var shiptoId = $('#shipto_shipto_id').val(); diff --git a/templates/webpages/customer_vendor/form.html b/templates/webpages/customer_vendor/form.html index 9aed70936..c8ec6b02e 100644 --- a/templates/webpages/customer_vendor/form.html +++ b/templates/webpages/customer_vendor/form.html @@ -67,7 +67,7 @@ [%- END %] [%- IF ( SELF.cv.id ) %] - + [%- END %] diff --git a/templates/webpages/customer_vendor/tabs/billing.html b/templates/webpages/customer_vendor/tabs/billing.html index 67c4ec76e..7635af49d 100644 --- a/templates/webpages/customer_vendor/tabs/billing.html +++ b/templates/webpages/customer_vendor/tabs/billing.html @@ -88,7 +88,7 @@ [% L.input_tag('cv.street', SELF.cv.street, size = 35, maxlength = 75) %] diff --git a/templates/webpages/customer_vendor/tabs/contacts.html b/templates/webpages/customer_vendor/tabs/contacts.html index 398f60c88..d2b87b13e 100644 --- a/templates/webpages/customer_vendor/tabs/contacts.html +++ b/templates/webpages/customer_vendor/tabs/contacts.html @@ -18,7 +18,7 @@ empty_title = LxERP.t8('New contact'), value_key = 'cp_id', title_key = 'full_name', - onchange = "namespace('kivi.CustomerVendor').selectContact({onFormSet: function(){contactsMapWidget.testInputs();}});", + onchange = "kivi.CustomerVendor.selectContact({onFormSet: function(){contactsMapWidget.testInputs();}});", ) %] @@ -159,7 +159,7 @@ [% L.input_tag('contact.cp_street', SELF.contact.cp_street, size = 40, maxlength = 75) %] diff --git a/templates/webpages/customer_vendor/tabs/deliveries.html b/templates/webpages/customer_vendor/tabs/deliveries.html index 559dc0bb2..8cf755fae 100644 --- a/templates/webpages/customer_vendor/tabs/deliveries.html +++ b/templates/webpages/customer_vendor/tabs/deliveries.html @@ -16,7 +16,7 @@ value_key = 'shipto_id', title_key = 'displayable_id', with_empty = 1, - onchange = "namespace('kivi.CustomerVendor').selectDelivery();" + onchange = "kivi.CustomerVendor.selectDelivery();" ) %] @@ -30,7 +30,7 @@ L.date_tag( 'delivery_from', FORM.delivery_from, - onchange => "namespace('kivi.CustomerVendor').selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);" + onchange => "kivi.CustomerVendor.selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);" ) %] @@ -43,7 +43,7 @@ L.date_tag( 'delivery_to', FORM.delivery_to, - onchange => "namespace('kivi.CustomerVendor').selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);" + onchange => "kivi.CustomerVendor.selectDelivery(this.form.delivery_from.value, this.form.delivery_to.value);" ) %] diff --git a/templates/webpages/customer_vendor/tabs/shipto.html b/templates/webpages/customer_vendor/tabs/shipto.html index 5080802c8..b4fbb2832 100644 --- a/templates/webpages/customer_vendor/tabs/shipto.html +++ b/templates/webpages/customer_vendor/tabs/shipto.html @@ -16,7 +16,7 @@ title_key = 'displayable_id', with_empty = 1, empty_title = LxERP.t8('New shipto'), - onchange = "namespace('kivi.CustomerVendor').selectShipto({onFormSet: function(){shiptoMapWidget.testInputs();}});", + onchange = "kivi.CustomerVendor.selectShipto({onFormSet: function(){shiptoMapWidget.testInputs();}});", ) %] @@ -47,7 +47,7 @@