From: <cli...@gr...> - 2007-05-28 15:14:04
|
Author: cliberty Date: 2007-05-28 08:14:00 -0700 (Mon, 28 May 2007) New Revision: 1721 Modified: versions/1.0/trunk/crmsfa/webapp/crmsfa/orders/entry/crmsfaQuickCheckout.ftl Log: Improving the JS date-change listener in the CRMSFA checkout Modified: versions/1.0/trunk/crmsfa/webapp/crmsfa/orders/entry/crmsfaQuickCheckout.ftl =================================================================== --- versions/1.0/trunk/crmsfa/webapp/crmsfa/orders/entry/crmsfaQuickCheckout.ftl 2007-05-28 07:08:50 UTC (rev 1720) +++ versions/1.0/trunk/crmsfa/webapp/crmsfa/orders/entry/crmsfaQuickCheckout.ftl 2007-05-28 15:14:00 UTC (rev 1721) @@ -31,11 +31,12 @@ dateCheckIntervalMillis = 1000; shipGroupShipBeforeDates = {}; - // Temporarily disabling the date-change listener to prevent CPU overusage - //dojo.addOnLoad(initializeDateCheck); + dojo.addOnLoad(initializeDateCheck); + var dateChangeInterval = null; function initializeDateCheck() { getShipBeforeDateValues(); + dateChangeInterval = setInterval("checkForDateChanges()", dateCheckIntervalMillis); checkForDateChanges(); } @@ -50,7 +51,6 @@ <#-- Poll the date fields for changed values --> <#-- TODO: Make this a useful function for a global JS --> - var timeout; function checkForDateChanges() { for (var elementId in shipGroupShipBeforeDates) { var shipBeforeDateInput = dojo.byId(elementId); @@ -61,7 +61,6 @@ shipGroupShipBeforeDates[elementId] = newValue; updateShipGroup(shipGroupSeqId, false); } - timeout = setTimeout("checkForDateChanges()", dateCheckIntervalMillis); } } |