Added functionality to page-150.php
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 29 Oct 2015 20:31:20 +0000 (16:31 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 29 Oct 2015 20:31:20 +0000 (16:31 -0400)
header.php
js/app.js
js/custom/pageSetup.js
page-118.php [new file with mode: 0644]

index 79062da..a64f11b 100644 (file)
                             </div>
                            <!-- <script type="text/javascript" src="//weblink.instantsoftware.com/scripts/widget?coid=1134&amp;header=Check Availability&amp;guests=true&amp;beds=false&amp;baths=false&amp;"></script> -->
                             <div class="large-10 columns">
-                                <form id = "form" method="post" action="https://weblink.instantsoftware.com/widgetsearch/1134" target="res_frame">
+                                <form id = "form" method="post" action="reservation" target="res_frame">
                                     <div class="row collapse">
                                         <div class="large-4 res-search columns">
                                             <input type="text" placeholder="Search by property, keywords, or destination" name="s">
                                         </div>
                                         <div class="large-2 res-date columns">
-                                            <input id="date1" name="ArrivalDate" placeholder="Arrival" type="text">
+                                            <input id="date1" name="ArrivalDate" placeholder="Arrival" type="text" >
                                      <img id="cal1" src="<?php echo get_template_directory_uri(); ?>/assets/calendar-icon.jpg" title="..." alt="..." class="ui-datepicker-trigger">
                                         </div>
                                         <div class="large-2 res-date columns">
@@ -99,3 +99,4 @@
                     </header>
                     <?php get_template_part('parts/top-bar');?>
                     <?php get_template_part('parts/off-canvas-menu');?>
+<!-- https://weblink.instantsoftware.com/widgetsearch/1134 -->
\ No newline at end of file
index 3d8e27d..4c125d6 100644 (file)
--- 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"));
+
 
 });
index 13c13f1..5fc2c85 100644 (file)
@@ -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 (file)
index 0000000..43682bc
--- /dev/null
@@ -0,0 +1,28 @@
+<?php get_header(); ?>
+<main class="page-inside">
+    <div id="head-img">
+        <?php echo glm_get_background(); ?>
+    </div>
+        <div id="content-wrapper">
+            <div class="row">
+                <div class="tag small-11 small-centered columns">
+                    <img class="show-for-small-down" src="<?php echo get_template_directory_uri(); ?>/assets/tagline.jpg">
+                </div>
+                <?php
+                get_template_part('parts/bread-crumbs');
+                ?>
+            </div>
+            <div class="row">
+                <div id="main-content" class="small-12 columns">
+                        <?php if(have_posts()) : while(have_posts()): the_post();?>
+                        <?php the_content();?>
+                        <?php endwhile; else:?>
+                        <p><?php _e('Sorry, no results found.');?></p>
+                        <?php endif;?>
+                
+                        <iframe name="res_frame" src="https://weblink.instantsoftware.com/widgetsearch/1134?ArrivalDate=<?php echo urlencode($_REQUEST['ArrivalDate']); ?> &DepartureDate= <?php echo urlencode($_REQUEST['DepartureDate']); ?>&Occupancy=<?php echo urlencode($_REQUEST['Occupancy']); ?>" height="3300" id="res_frame" width="100%" frameborder="0"></iframe>
+                </div>
+            </div>
+        </div>
+</main><!--End of main-->
+<?php get_footer(); ?>