From: G. Richardson Date: Tue, 21 Oct 2014 00:19:31 +0000 (+0200) Subject: setTimeOut für schnelle Datumseinsgabe bei set_duedate X-Git-Tag: release-3.2.0beta~215 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=93b69b192a3dcd39d09b7a7e24b1482bdfa69e6b;p=kivitendo-erp.git setTimeOut für schnelle Datumseinsgabe bei set_duedate Die jquery-Abfrage des Datumsfeldes in set_duedate (Fälligkeitsdatum) wird mit setTimeOut erst nach Ersetzen des Datums per schneller Datumseingabe durchführen --- 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); } //-->