fixed off canvas datepicker and added shadow to properties menu
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 2 Dec 2015 21:04:40 +0000 (16:04 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 2 Dec 2015 21:04:40 +0000 (16:04 -0500)
css/app.css
js/app.js
js/custom/pageSetup.js
scss/_topbar.scss

index edacc21..e2fc1a0 100644 (file)
@@ -6807,7 +6807,8 @@ header .searchform input[type="submit"]:hover {
       width: 245px;
       height: 40px;
       border-left: 2px solid #FFFFFF;
-      border-right: 2px solid #FFFFFF; }
+      border-right: 2px solid #FFFFFF;
+      box-shadow: 0px -7px 10px -9px rgba(0, 0, 0, 0.5) inset; }
       #properties .top-bar .top-bar-section ul#menu-properties li a {
         color: #6c4f53;
         text-transform: uppercase;
index ede0453..16aa146 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -36,13 +36,41 @@ $(document).ready(function () {
         kids,
         perry = 'RtXm7mjas4tWRxEAkt8ienQMPRR5EbsZGSOalE8V63s%3d&';
     
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
     ///////off canvas date picker logic //////////////////////////////////////////////
     // restrict arrival date ////////////////////////////////
+    $("#arriveOff").val("Arrival Date");
+    $("#departOff").val("Departure Date");
     $(document).on('change', '#arriveOff', function () {
         currentDate = $("#arriveOff").val();
         currentDate = new Date(currentDate);
         currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate());
         currentDate.setDate(currentDate.getDate());
+        console.log(currentDate);
         d = currentDate.getDate();
         dd = currentDate.getDate() + 1;
         if (d <= 9) {
@@ -54,10 +82,7 @@ $(document).ready(function () {
         }
         y = currentDate.getFullYear();
         requiredDate = y + '-' + m + '-' + d;
-        arrival = d + '-' + m + '-' + y;
-        arrival.toString();
-        arrival = arrival.replace(/\//g, "");
-        arrival = parseInt(arrival, 10);
+
         minDays = y + '-' + m + '-' + dd;
         $("#departOff").attr("min", minDays);
         start = "arrival_date=" + y + '-' + m + '-' + d + '&';
@@ -86,11 +111,15 @@ $(document).ready(function () {
         currentDate2 = new Date(currentDate2);
         currentDate2 = new Date(currentDate2.getUTCFullYear(), currentDate2.getUTCMonth(), currentDate2.getUTCDate());
         currentDate2.setDate(currentDate2.getDate());
-        dd = currentDate2.getDate() + 1;
-        if (dd <= 9) {
-            dd = '0' + dd;
+        console.log(currentDate2);
+        $("#nightsOff").val(Math.ceil(currentDate2 - currentDate) / (1000 * 60 * 60 * 24));
+        if ($("#nightsOff").val() <= 0) {
+            $("#departOff").val("Minimum 1 Night");
+            $("#nightsOff").val("");
         }
-        d = currentDate2.getDate();
+        console.log($("#nightsOff").val());
+    
+        d = currentDate2.getDate() + 1;
         if (d <= 9) {
             d = '0' + d;
         }
@@ -101,21 +130,32 @@ $(document).ready(function () {
         y = currentDate2.getFullYear();
         requiredDate1 = y + '-' + m + '-' + dd;
         departure = d + '-' + m + '-' + y;
-        departure.toString();
-        departure = departure.replace(/\//g, "");
-        departure = parseInt(departure, 10);
-        stay = (departure - arrival);
-        if (stay < 0) {
-            stay = 0;
-        } else {
-            $("#nightsOff").val(Math.ceil(departure - currentDate) / (1000 * 60 * 60 * 24));
-        }
-        stay = 'stay_nights=' + (departure - arrival) + '&';
+        stay = 'stay_nights=' + $('#nightsOff').val() + '&';
         if ($("#departOff").val() < $('#departOff').attr("min")) {
            // $("#departOff").val(requiredDate);
         }
     });
     ///// end of canvas datepicker logic ^ //////////////////////////////////////////////
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
     
     /// top bar reservation form dropdown logic ////////////////////////////
     $("#arrive").datepicker({
@@ -151,7 +191,7 @@ $(document).ready(function () {
             stay = 'stay_nights=' + $('#nights').val() + '&';
 
         }
-    }); 
+    });
     $("#arriveCal").click(function () {
         $("#arrive").datepicker("show");
     });
index 0b6970e..470ee5f 100644 (file)
@@ -27,13 +27,41 @@ $(document).ready(function () {
         kids,
         perry = 'RtXm7mjas4tWRxEAkt8ienQMPRR5EbsZGSOalE8V63s%3d&';
     
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
     ///////off canvas date picker logic //////////////////////////////////////////////
     // restrict arrival date ////////////////////////////////
+    $("#arriveOff").val("Arrival Date");
+    $("#departOff").val("Departure Date");
     $(document).on('change', '#arriveOff', function () {
         currentDate = $("#arriveOff").val();
         currentDate = new Date(currentDate);
         currentDate = new Date(currentDate.getUTCFullYear(), currentDate.getUTCMonth(), currentDate.getUTCDate());
         currentDate.setDate(currentDate.getDate());
+        console.log(currentDate);
         d = currentDate.getDate();
         dd = currentDate.getDate() + 1;
         if (d <= 9) {
@@ -45,10 +73,7 @@ $(document).ready(function () {
         }
         y = currentDate.getFullYear();
         requiredDate = y + '-' + m + '-' + d;
-        arrival = d + '-' + m + '-' + y;
-        arrival.toString();
-        arrival = arrival.replace(/\//g, "");
-        arrival = parseInt(arrival, 10);
+
         minDays = y + '-' + m + '-' + dd;
         $("#departOff").attr("min", minDays);
         start = "arrival_date=" + y + '-' + m + '-' + d + '&';
@@ -77,11 +102,15 @@ $(document).ready(function () {
         currentDate2 = new Date(currentDate2);
         currentDate2 = new Date(currentDate2.getUTCFullYear(), currentDate2.getUTCMonth(), currentDate2.getUTCDate());
         currentDate2.setDate(currentDate2.getDate());
-        dd = currentDate2.getDate() + 1;
-        if (dd <= 9) {
-            dd = '0' + dd;
+        console.log(currentDate2);
+        $("#nightsOff").val(Math.ceil(currentDate2 - currentDate) / (1000 * 60 * 60 * 24));
+        if ($("#nightsOff").val() <= 0) {
+            $("#departOff").val("Minimum 1 Night");
+            $("#nightsOff").val("");
         }
-        d = currentDate2.getDate();
+        console.log($("#nightsOff").val());
+    
+        d = currentDate2.getDate() + 1;
         if (d <= 9) {
             d = '0' + d;
         }
@@ -92,21 +121,32 @@ $(document).ready(function () {
         y = currentDate2.getFullYear();
         requiredDate1 = y + '-' + m + '-' + dd;
         departure = d + '-' + m + '-' + y;
-        departure.toString();
-        departure = departure.replace(/\//g, "");
-        departure = parseInt(departure, 10);
-        stay = (departure - arrival);
-        if (stay < 0) {
-            stay = 0;
-        } else {
-            $("#nightsOff").val(Math.ceil(departure - currentDate) / (1000 * 60 * 60 * 24));
-        }
-        stay = 'stay_nights=' + (departure - arrival) + '&';
+        stay = 'stay_nights=' + $('#nightsOff').val() + '&';
         if ($("#departOff").val() < $('#departOff').attr("min")) {
            // $("#departOff").val(requiredDate);
         }
     });
     ///// end of canvas datepicker logic ^ //////////////////////////////////////////////
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
+    
     
     /// top bar reservation form dropdown logic ////////////////////////////
     $("#arrive").datepicker({
@@ -142,7 +182,7 @@ $(document).ready(function () {
             stay = 'stay_nights=' + $('#nights').val() + '&';
 
         }
-    }); 
+    });
     $("#arriveCal").click(function () {
         $("#arrive").datepicker("show");
     });
index db4d8f0..d8efc65 100644 (file)
                     height: 40px;
                     border-left: 2px solid $white;
                     border-right: 2px solid $white;
+                    box-shadow: 0px -7px 10px -9px rgba(0, 0, 0, 0.5) inset;
                     a {
                         color: $purple;
                         text-transform: uppercase;