From: Anthony Talarico Date: Thu, 29 Oct 2015 20:31:20 +0000 (-0400) Subject: Added functionality to page-150.php X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b9108a83573bb225b3631174239730258e4ea651;p=WP-Themes%2Fglmthemes%2Fbpla-theme.git Added functionality to page-150.php --- diff --git a/header.php b/header.php index 79062da..a64f11b 100644 --- a/header.php +++ b/header.php @@ -51,13 +51,13 @@
-
+
- + ...
@@ -99,3 +99,4 @@ + \ No newline at end of file diff --git a/js/app.js b/js/app.js index 3d8e27d..4c125d6 100644 --- a/js/app.js +++ b/js/app.js @@ -43,34 +43,35 @@ $(document).ready(function () { page = $(location).attr('pathname'); // if current page is NOT reservation change submit to regular button to nav to reservation page - if (page.indexOf("reservation") <= 0) { + /* if (page.indexOf("reservation") <= 0) { $("#resBtn").prop("type", 'button'); $("#resBtn").prop("id", "btn"); $("#offResBtn").prop("type", 'button'); $("#offResBtn").prop("id", "offBtn"); - } + } */ // remove featured image from reservation page and trigger form submission to iframe if (page.indexOf("reservation") >= 0) { $("#head-img").remove(); - $(document).ready(function () { + /* $(document).ready(function () { $("#resBtn").trigger("click"); - }); + }); */ } // navigate to reservation page - $('#btn').click(function () { - window.location.href = "reservation"; - }); - $('#offBtn').click(function () { - window.location.href = "reservation"; + // $('#btn').click(function () { + // window.location.href = "reservation"; + //}); + //$('#offBtn').click(function () { + // window.location.href = "reservation"; - }); + // }); // save guest input $('#guests').blur(function () { guests = $('#guests').val(); - sessionStorage.setItem("guests", guests); + }); + // date picker images for each calendar $("#cal1").click(function () { $("#date1").datepicker("show"); }); @@ -83,70 +84,49 @@ $(document).ready(function () { $("#offCal2").click(function () { $("#dateOff2").datepicker("show"); }); - //$(".weblink-search-container").hide(); + $("#date1").datepicker({ minDate: 2, - //showOn: 'both', - //buttonImageOnly: true, - onSelect: function (date) { $("#date1").datepicker({dateFormat: 'yy-mm-dd'}).val(); nights = $("#date1").datepicker('getDate'); - //nights = date; nights.setDate(nights.getDate() + 2); $("#date2").datepicker("option", {minDate: new Date(nights)}); arrival = $("#date1").val(); - sessionStorage.setItem("arrival", arrival); + } }); $("#date2").datepicker({ - minDate: nights, - //showOn: 'both', - // buttonImageOnly: true, - onSelect: function (date) { departure = $("#date2").val(); - sessionStorage.setItem("departure", departure); + } }); // off canvas menu values ///////////////////////// $('#offGuests').blur(function () { guests = $('#offGuests').val(); - sessionStorage.setItem("guests", guests); + }); $("#dateOff1").datepicker({ minDate: 2, - //showOn: 'both', - //buttonImageOnly: true, - // buttonImage: "http://localhost/WordPress/bpla/wp-content/themes/bpla/assets/calendar-icon.jpg", onSelect: function (date) { $("#dateOff1").datepicker({dateFormat: 'yy-mm-dd'}).val(); nights = $("#dateOff1").datepicker('getDate'); - //nights = date; nights.setDate(nights.getDate() + 2); $("#dateOff2").datepicker("option", {minDate: new Date(nights)}); arrival = $("#dateOff1").val(); - sessionStorage.setItem("arrival", arrival); + } }); $("#dateOff2").datepicker({ - //showOn: 'both', - //buttonImageOnly: true, - // buttonImage: "http://localhost/WordPress/bpla/wp-content/themes/bpla/assets/calendar-icon.jpg", onSelect: function (date) { departure = $("#dateOff2").val(); - sessionStorage.setItem("departure", departure); + } }); - // restore input values after page reload. sessionStorage will delete values if tab or window is closed - $("#date1").val(sessionStorage.getItem("arrival")); - $("#date2").val(sessionStorage.getItem("departure")); - $("#dateOff1").val(sessionStorage.getItem("arrival")); - $("#dateOff2").val(sessionStorage.getItem("departure")); - $('#guests').val(sessionStorage.getItem("guests")); - $('#offGuests').val(sessionStorage.getItem("guests")); + }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 13c13f1..5fc2c85 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -33,35 +33,21 @@ $(document).ready(function () { // get the url to determine the page location page = $(location).attr('pathname'); - // if current page is NOT reservation change submit to regular button to nav to reservation page - if (page.indexOf("reservation") <= 0) { - $("#resBtn").prop("type", 'button'); - $("#resBtn").prop("id", "btn"); - $("#offResBtn").prop("type", 'button'); - $("#offResBtn").prop("id", "offBtn"); - } // remove featured image from reservation page and trigger form submission to iframe if (page.indexOf("reservation") >= 0) { $("#head-img").remove(); - $(document).ready(function () { + /* $(document).ready(function () { $("#resBtn").trigger("click"); - }); + }); */ } - // navigate to reservation page - $('#btn').click(function () { - window.location.href = "reservation"; - }); - $('#offBtn').click(function () { - window.location.href = "reservation"; - - }); // save guest input $('#guests').blur(function () { guests = $('#guests').val(); - sessionStorage.setItem("guests", guests); + }); + // date picker images for each calendar $("#cal1").click(function () { $("#date1").datepicker("show"); }); @@ -74,70 +60,49 @@ $(document).ready(function () { $("#offCal2").click(function () { $("#dateOff2").datepicker("show"); }); - //$(".weblink-search-container").hide(); + $("#date1").datepicker({ minDate: 2, - //showOn: 'both', - //buttonImageOnly: true, - onSelect: function (date) { $("#date1").datepicker({dateFormat: 'yy-mm-dd'}).val(); nights = $("#date1").datepicker('getDate'); - //nights = date; nights.setDate(nights.getDate() + 2); $("#date2").datepicker("option", {minDate: new Date(nights)}); arrival = $("#date1").val(); - sessionStorage.setItem("arrival", arrival); + } }); $("#date2").datepicker({ - minDate: nights, - //showOn: 'both', - // buttonImageOnly: true, - onSelect: function (date) { departure = $("#date2").val(); - sessionStorage.setItem("departure", departure); + } }); // off canvas menu values ///////////////////////// $('#offGuests').blur(function () { guests = $('#offGuests').val(); - sessionStorage.setItem("guests", guests); + }); $("#dateOff1").datepicker({ minDate: 2, - //showOn: 'both', - //buttonImageOnly: true, - // buttonImage: "http://localhost/WordPress/bpla/wp-content/themes/bpla/assets/calendar-icon.jpg", onSelect: function (date) { $("#dateOff1").datepicker({dateFormat: 'yy-mm-dd'}).val(); nights = $("#dateOff1").datepicker('getDate'); - //nights = date; nights.setDate(nights.getDate() + 2); $("#dateOff2").datepicker("option", {minDate: new Date(nights)}); arrival = $("#dateOff1").val(); - sessionStorage.setItem("arrival", arrival); + } }); $("#dateOff2").datepicker({ - //showOn: 'both', - //buttonImageOnly: true, - // buttonImage: "http://localhost/WordPress/bpla/wp-content/themes/bpla/assets/calendar-icon.jpg", onSelect: function (date) { departure = $("#dateOff2").val(); - sessionStorage.setItem("departure", departure); + } }); - // restore input values after page reload. sessionStorage will delete values if tab or window is closed - $("#date1").val(sessionStorage.getItem("arrival")); - $("#date2").val(sessionStorage.getItem("departure")); - $("#dateOff1").val(sessionStorage.getItem("arrival")); - $("#dateOff2").val(sessionStorage.getItem("departure")); - $('#guests').val(sessionStorage.getItem("guests")); - $('#offGuests').val(sessionStorage.getItem("guests")); + }); diff --git a/page-118.php b/page-118.php new file mode 100644 index 0000000..43682bc --- /dev/null +++ b/page-118.php @@ -0,0 +1,28 @@ + +
+
+ +
+
+
+
+ +
+ +
+
+
+ + + +

+ + + +
+
+
+
+