From: Anthony Talarico Date: Wed, 2 Dec 2015 21:18:42 +0000 (-0500) Subject: removed submit from off canvas res form, adjusted off canvas res form date logic X-Git-Tag: v1.0.0^2~164 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=bef1c44178731216da2fdf71ba95577a8c3b5466;p=WP-Themes%2Fstaffords.git removed submit from off canvas res form, adjusted off canvas res form date logic --- diff --git a/css/app.css b/css/app.css index e2fc1a0..95275ac 100644 --- a/css/app.css +++ b/css/app.css @@ -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; diff --git a/js/app.js b/js/app.js index 16aa146..783dcf9 100644 --- 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 ^ ////////////////////////////////////////////// diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 470ee5f..d6578ed 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -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 ^ ////////////////////////////////////////////// diff --git a/parts/reservation-form-off-canvas.php b/parts/reservation-form-off-canvas.php index 9067057..1f58a8a 100644 --- a/parts/reservation-form-off-canvas.php +++ b/parts/reservation-form-off-canvas.php @@ -50,7 +50,7 @@
- +
\ No newline at end of file diff --git a/scss/_topbar.scss b/scss/_topbar.scss index d8efc65..08a466f 100644 --- a/scss/_topbar.scss +++ b/scss/_topbar.scss @@ -464,6 +464,9 @@ 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; @@ -471,6 +474,7 @@ font-size: rem-calc(18); letter-spacing: 2px; &:hover { + color: $red; z-index: 99; // padding-bottom: 10px;