From 58f881be3b672cd205294ae03024fc35c5a658c4 Mon Sep 17 00:00:00 2001 From: Adam R Claxton Date: Fri, 17 Mar 2017 18:52:44 -0400 Subject: [PATCH] Added calendar selector-that was easier than I thought. Needs some css love, and a way to include data from the new fields when generating tickets. --- WebContent/html/webpages/shoppingCart.jsp | 29 ++++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/WebContent/html/webpages/shoppingCart.jsp b/WebContent/html/webpages/shoppingCart.jsp index 2862eb5..e402d2d 100644 --- a/WebContent/html/webpages/shoppingCart.jsp +++ b/WebContent/html/webpages/shoppingCart.jsp @@ -64,11 +64,11 @@ pageEncoding="ISO-8859-1"%> -
+

-
+

@@ -82,27 +82,27 @@ pageEncoding="ISO-8859-1"%>
- +
- +
- +
- +
-
- +
+
@@ -137,10 +137,11 @@ document.getElementById('ds').addEventListener('click',deleteSelected); document.getElementById('oa').addEventListener('click',orderAll_showPopup); document.getElementById('da').addEventListener('click',deleteAll); -document.orderForm.address.addEventListener('onkeyup',forceDropdownCustomLocation); -document.orderForm.city.addEventListener('onkeyup',forceDropdownCustomLocation); -document.orderForm.state.addEventListener('onkeyup',forceDropdownCustomLocation); -document.orderForm.zip.addEventListener('onkeyup',forceDropdownCustomLocation); +// Event listeners for order form address fields, to force select New Location if a field is changed +document.orderForm.address.addEventListener('keyup',forceDropdownCustomLocation); +document.orderForm.city.addEventListener('keyup',forceDropdownCustomLocation); +document.orderForm.state.addEventListener('keyup',forceDropdownCustomLocation); +document.orderForm.zip.addEventListener('keyup',forceDropdownCustomLocation); document.onkeydown = function(e) { if (e.keyCode == 27) { @@ -291,7 +292,7 @@ function autoFillFields(orderAllBool) { document.orderForm.name.value=employee.name; document.orderForm.phone.value=employee.phone; // already got locations on page load, now populate dropdown and mark appropriate option selected - document.orderForm.location_dropdown.innerHTML=""; + document.orderForm.location_dropdown.innerHTML=""; for (var i = locations.length - 1; i >= 0; i--) { document.orderForm.location_dropdown.innerHTML+= ("