adjusting cookies for search query
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 1 Feb 2016 17:01:59 +0000 (12:01 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 1 Feb 2016 17:01:59 +0000 (12:01 -0500)
js/app.js
js/custom/upcp.js

index a8ac180..1bc9a7c 100644 (file)
--- 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
index 016d88b..176d7ed 100644 (file)
@@ -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