From: Anthony Talarico Date: Thu, 4 May 2017 11:58:43 +0000 (-0400) Subject: adding session storage to the header and events search widget X-Git-Tag: v1.0.0^2~7 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=e80478ff564bffeb3eb67f49efb1ce0b68b64d5b;p=WP-Themes%2Fcharlevoixlibrary.git adding session storage to the header and events search widget using session storage to override the events list view if calendar is set. this is how it's being done in the plugin so i'm also setting the sessionStorage variable when a search is performed in the theme --- diff --git a/index.php b/index.php index 1cd3344..3966d29 100644 --- a/index.php +++ b/index.php @@ -43,13 +43,13 @@ jQuery(function(){ // 'Global' Namespace var page = $('body'); - + var event_search = page.find('.event-search'); // Search Namespace / Module var search = ( function(){ // Private members var baseUrl = ''; - var eventsPage = ''; + var eventsPage = ''; var url,queryType; // Public members @@ -106,10 +106,15 @@ }); }); - }, + }, } })(); search.changeAction(search.getCatalogSearch(),search.getMainSearch(),search.getEventSearch(),search.getSearchForm()); + + event_search.on('click', function(){ + sessionStorage.override = 'yes'; + }); + });