removed submit from off canvas res form, adjusted off canvas res form date logic
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 2 Dec 2015 21:18:42 +0000 (16:18 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 2 Dec 2015 21:18:42 +0000 (16:18 -0500)
css/app.css
js/app.js
js/custom/pageSetup.js
parts/reservation-form-off-canvas.php
scss/_topbar.scss

index e2fc1a0..95275ac 100644 (file)
@@ -6809,6 +6809,8 @@ header .searchform input[type="submit"]:hover {
       border-left: 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:hover {
+        box-shadow: none; }
       #properties .top-bar .top-bar-section ul#menu-properties li a {
         color: #6c4f53;
         text-transform: uppercase;
index 16aa146..783dcf9 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -35,44 +35,23 @@ $(document).ready(function () {
         adults,
         kids,
         perry = 'RtXm7mjas4tWRxEAkt8ienQMPRR5EbsZGSOalE8V63s%3d&';
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
+
     ///////off canvas date picker logic //////////////////////////////////////////////
-    // restrict arrival date ////////////////////////////////
+    // Set inputs to default values ///////
+    $("#propertyNameOff").val("");
     $("#arriveOff").val("Arrival Date");
     $("#departOff").val("Departure Date");
+    $("#nightsOff").val("");
+    $("#adultsOff").val("");
+    $("#kidsOff").val("");
+    
     $(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) {
             d = '0' + d;
         }
@@ -81,29 +60,8 @@ $(document).ready(function () {
             m = '0' + m;
         }
         y = currentDate.getFullYear();
-        requiredDate = y + '-' + m + '-' + d;
-
-        minDays = y + '-' + m + '-' + dd;
-        $("#departOff").attr("min", minDays);
         start = "arrival_date=" + y + '-' + m + '-' + d + '&';
-        if (requiredDate < $('#arriveOff').attr("min")) {
-            minDays = $('#arriveOff').attr("min");
-            $("#arriveOff").val(minDays);
-           //$("#departOff")//.attr("min"));
-        } else {
-            d = currentDate.getDate() + 1;
-            if (d <= 9) {
-                d = '0' + d;
-            }
-            m = currentDate.getMonth() + 1;
-            if (m <= 9) {
-                m = '0' + m;
-            }
-            y = currentDate.getFullYear();
-            requiredDate = y + '-' + m + '-' + d;
-            //$("#departOff").val(requiredDate);
-        }
-        requiredDate = y + '-' + m + '-' + dd;
+        console.log(currentDate);
     });
     // restrict departure date ///////////////////////////////
     $(document).on('change', '#departOff', function () {
@@ -117,23 +75,8 @@ $(document).ready(function () {
             $("#departOff").val("Minimum 1 Night");
             $("#nightsOff").val("");
         }
-        console.log($("#nightsOff").val());
-    
-        d = currentDate2.getDate() + 1;
-        if (d <= 9) {
-            d = '0' + d;
-        }
-        m = currentDate2.getMonth() + 1;
-        if (m <= 9) {
-            m = '0' + m;
-        }
-        y = currentDate2.getFullYear();
-        requiredDate1 = y + '-' + m + '-' + dd;
-        departure = d + '-' + m + '-' + y;
         stay = 'stay_nights=' + $('#nightsOff').val() + '&';
-        if ($("#departOff").val() < $('#departOff').attr("min")) {
-           // $("#departOff").val(requiredDate);
-        }
+        console.log(stay);
     });
     ///// end of canvas datepicker logic ^ //////////////////////////////////////////////
     
index 470ee5f..d6578ed 100644 (file)
@@ -26,44 +26,23 @@ $(document).ready(function () {
         adults,
         kids,
         perry = 'RtXm7mjas4tWRxEAkt8ienQMPRR5EbsZGSOalE8V63s%3d&';
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
+
     ///////off canvas date picker logic //////////////////////////////////////////////
-    // restrict arrival date ////////////////////////////////
+    // Set inputs to default values ///////
+    $("#propertyNameOff").val("");
     $("#arriveOff").val("Arrival Date");
     $("#departOff").val("Departure Date");
+    $("#nightsOff").val("");
+    $("#adultsOff").val("");
+    $("#kidsOff").val("");
+    
     $(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) {
             d = '0' + d;
         }
@@ -72,29 +51,8 @@ $(document).ready(function () {
             m = '0' + m;
         }
         y = currentDate.getFullYear();
-        requiredDate = y + '-' + m + '-' + d;
-
-        minDays = y + '-' + m + '-' + dd;
-        $("#departOff").attr("min", minDays);
         start = "arrival_date=" + y + '-' + m + '-' + d + '&';
-        if (requiredDate < $('#arriveOff').attr("min")) {
-            minDays = $('#arriveOff').attr("min");
-            $("#arriveOff").val(minDays);
-           //$("#departOff")//.attr("min"));
-        } else {
-            d = currentDate.getDate() + 1;
-            if (d <= 9) {
-                d = '0' + d;
-            }
-            m = currentDate.getMonth() + 1;
-            if (m <= 9) {
-                m = '0' + m;
-            }
-            y = currentDate.getFullYear();
-            requiredDate = y + '-' + m + '-' + d;
-            //$("#departOff").val(requiredDate);
-        }
-        requiredDate = y + '-' + m + '-' + dd;
+        console.log(currentDate);
     });
     // restrict departure date ///////////////////////////////
     $(document).on('change', '#departOff', function () {
@@ -108,23 +66,8 @@ $(document).ready(function () {
             $("#departOff").val("Minimum 1 Night");
             $("#nightsOff").val("");
         }
-        console.log($("#nightsOff").val());
-    
-        d = currentDate2.getDate() + 1;
-        if (d <= 9) {
-            d = '0' + d;
-        }
-        m = currentDate2.getMonth() + 1;
-        if (m <= 9) {
-            m = '0' + m;
-        }
-        y = currentDate2.getFullYear();
-        requiredDate1 = y + '-' + m + '-' + dd;
-        departure = d + '-' + m + '-' + y;
         stay = 'stay_nights=' + $('#nightsOff').val() + '&';
-        if ($("#departOff").val() < $('#departOff').attr("min")) {
-           // $("#departOff").val(requiredDate);
-        }
+        console.log(stay);
     });
     ///// end of canvas datepicker logic ^ //////////////////////////////////////////////
     
index 9067057..1f58a8a 100644 (file)
@@ -50,7 +50,7 @@
                                  </select>                                    
             </div>
             <div class="small-6 small-centered columns resBtnOff">
-                <input class="res-buttonOff" type="submit" value="Book Now">
+                <input class="res-buttonOff" type="button" value="Book Now">
             </div>
         </div>
     </form>
\ No newline at end of file
index d8efc65..08a466f 100644 (file)
                     border-left: 2px solid $white;
                     border-right: 2px solid $white;
                     box-shadow: 0px -7px 10px -9px rgba(0, 0, 0, 0.5) inset;
+                    &:hover{
+                        box-shadow: none;
+                    }
                     a {
                         color: $purple;
                         text-transform: uppercase;
                         font-size: rem-calc(18);
                         letter-spacing: 2px;
                         &:hover {
+                          
                             color: $red;
                             z-index: 99;
 //                            padding-bottom: 10px;