From 93b69b192a3dcd39d09b7a7e24b1482bdfa69e6b Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Tue, 21 Oct 2014 02:19:31 +0200 Subject: [PATCH] =?utf8?q?setTimeOut=20f=C3=BCr=20schnelle=20Datumseinsgab?= =?utf8?q?e=20bei=20set=5Fduedate?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Die jquery-Abfrage des Datumsfeldes in set_duedate (Fälligkeitsdatum) wird mit setTimeOut erst nach Ersetzen des Datums per schneller Datumseingabe durchführen --- templates/webpages/ir/form_header.html | 22 ++++++++++++---------- templates/webpages/is/form_header.html | 22 +++++++++++++--------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/templates/webpages/ir/form_header.html b/templates/webpages/ir/form_header.html index 673f1a8d0..f5af2b451 100644 --- a/templates/webpages/ir/form_header.html +++ b/templates/webpages/ir/form_header.html @@ -212,16 +212,18 @@ [% END %] }); function set_duedate() { - $.ajax({ - url: 'ir.pl?action=get_duedate_vendor', - data: { - invdate: $('#invdate').val(), - vendor_id: $('input[name="vendor_id"]').val(), - old_duedate: $('#duedate').val(), - }, - dataType: 'text', - success: function (data) { $('#duedate').val(data); } - }) + setTimeout(function() { + $.ajax({ + url: 'ir.pl?action=get_duedate_vendor', + data: { + invdate: $('#invdate').val(), + vendor_id: $('input[name="vendor_id"]').val(), + old_duedate: $('#duedate').val(), + }, + dataType: 'text', + success: function (data) { $('#duedate').val(data); } + }) + }, 0); } //--> diff --git a/templates/webpages/is/form_header.html b/templates/webpages/is/form_header.html index 0d4a255be..d0c645194 100644 --- a/templates/webpages/is/form_header.html +++ b/templates/webpages/is/form_header.html @@ -271,15 +271,19 @@ [% END %] }); function set_duedate() { - $.ajax({ - url: 'is.pl?action=set_duedate', - data: { - invdate: $('#invdate').val(), - payment_id: $('#payment_id').val(), - }, - dataType: 'text', - success: function (data) { $('#duedate').val(data); } - }) + setTimeout(function() { + $.ajax({ + url: 'is.pl?action=set_duedate', + data: { + invdate: $('#invdate').val(), + payment_id: $('#payment_id').val(), + }, + dataType: 'text', + success: function (data) { + $('#duedate').val(data); + } + }) + }, 0); } //--> -- 2.20.1