From: Anthony Talarico Date: Mon, 1 Feb 2016 17:01:59 +0000 (-0500) Subject: adjusting cookies for search query X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=380d2003e90f435c5345e34bcd0e76e571f3a1b5;p=WP-Themes%2Fmichsci.git adjusting cookies for search query --- diff --git a/js/app.js b/js/app.js index a8ac180..1bc9a7c 100644 --- a/js/app.js +++ b/js/app.js @@ -36,11 +36,9 @@ $(document).ready(function () { } // createCookie("link", "null"); document.cookie = "catView=grid"; - // don't display products on the main "products page" if ((window.location.href.indexOf("products-2") >= 0)){ -// document.cookie = "test=null"; - if(document.cookie.indexOf("cool") >= 0){ + if(document.cookie.indexOf("true") >= 0){ $("#gridView").css("display", "inherit"); $("#listView").css("display", "inherit"); } else { @@ -160,8 +158,8 @@ $(document).ready(function () { $(".product").show(); } if($("#tagBox :checkbox:checked").length === 0 && window.location.href.indexOf("products-3/") >= 0){ -// $("#categoriesGridView").show(); -// $("#categoriesListView").show(); + $("#categoriesGridView").show(); + $("#categoriesListView").show(); $("#categoriesGridView").hide(); $("#categoriesListView").hide(); $("#gridView").css("display", "inherit"); @@ -239,8 +237,7 @@ $(document).ready(function () { $(".top-bar").find(".menu-item").find(".sub-menu.dropdown").find(".menu-item").on("click", function () { createCookieSubcat("subcat", "subcat"); }); - - + if ((window.location.href.indexOf("/?michsci_category") >= 0) || (window.location.href.indexOf("/?pagename") >= 0) ){ var $bottomText = $("#catelog-content").nextAll(); var $bottomText2 = $("#categoriesGridView").nextAll(); @@ -248,7 +245,5 @@ $(document).ready(function () { $bottomText.hide(); $bottomText2.hide(); $bottomText3.hide(); - } - }); \ No newline at end of file diff --git a/js/custom/upcp.js b/js/custom/upcp.js index 016d88b..176d7ed 100644 --- a/js/custom/upcp.js +++ b/js/custom/upcp.js @@ -16,11 +16,9 @@ $(document).ready(function () { } // createCookie("link", "null"); document.cookie = "catView=grid"; - // don't display products on the main "products page" if ((window.location.href.indexOf("products-2") >= 0)){ -// document.cookie = "test=null"; - if(document.cookie.indexOf("cool") >= 0){ + if(document.cookie.indexOf("true") >= 0){ $("#gridView").css("display", "inherit"); $("#listView").css("display", "inherit"); } else { @@ -140,8 +138,8 @@ $(document).ready(function () { $(".product").show(); } if($("#tagBox :checkbox:checked").length === 0 && window.location.href.indexOf("products-3/") >= 0){ -// $("#categoriesGridView").show(); -// $("#categoriesListView").show(); + $("#categoriesGridView").show(); + $("#categoriesListView").show(); $("#categoriesGridView").hide(); $("#categoriesListView").hide(); $("#gridView").css("display", "inherit"); @@ -219,8 +217,7 @@ $(document).ready(function () { $(".top-bar").find(".menu-item").find(".sub-menu.dropdown").find(".menu-item").on("click", function () { createCookieSubcat("subcat", "subcat"); }); - - + if ((window.location.href.indexOf("/?michsci_category") >= 0) || (window.location.href.indexOf("/?pagename") >= 0) ){ var $bottomText = $("#catelog-content").nextAll(); var $bottomText2 = $("#categoriesGridView").nextAll(); @@ -228,7 +225,5 @@ $(document).ready(function () { $bottomText.hide(); $bottomText2.hide(); $bottomText3.hide(); - } - }); \ No newline at end of file