fixed syntax error
authorAnthony Talarico <talarico@gaslightmedia.com>
Mon, 28 Dec 2015 19:12:09 +0000 (14:12 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Mon, 28 Dec 2015 19:12:09 +0000 (14:12 -0500)
js/app.js
js/custom/upcp.js

index 0c0b44d..eca8c71 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -23,7 +23,7 @@ $(document).ready(function () {
     "use strict";
     document.cookie = "catView=grid";
     // don't display products on the main "products page"
-    if ((window.location.href.indexOf("products") >= 0)){
+    if ((window.location.href.indexOf("products-2") >= 0)){
         $("#gridView").css("display", "none");
         $("#listView").css("display", "none");
         $("#grid").on("click", function (e) {
@@ -36,7 +36,7 @@ $(document).ready(function () {
         });
     }
     // hide product display initially
-    if ((window.location.href.indexOf("products/?michsci_category") >= 0)){
+    if ((window.location.href.indexOf("products-2/?michsci_category") >= 0)){
         $("#productsView").css("display", "inherit");
         $("#categoriesView").css("display", "none");
         $("#gridView").css("display", "inherit");
@@ -46,7 +46,7 @@ $(document).ready(function () {
     }
     
     // navigate back to products page if on single product page
-    if ((window.location.href.indexOf("products/?pagename") >= 0)) {
+    if ((window.location.href.indexOf("products-2/?pagename") >= 0)) {
 //        $("#viewBtns").css("display", "none");
         $("#grid").on("click", function (e) {
             document.cookie = "view=grid";
@@ -58,7 +58,7 @@ $(document).ready(function () {
         });
     }
     // change output view from list to grid
-    if (!(window.location.href.indexOf("products/?pagename") >= 0)) {
+    if (!(window.location.href.indexOf("products-2/?pagename") >= 0)) {
     $("#grid").on("click", function (e) {
         document.cookie = "view=grid";
         location.reload();
@@ -87,7 +87,7 @@ $(document).ready(function () {
             $("." + $(this).val()).show();
         });
         // hide products on front page, show all products if on products page
-        if($("#tagBox :checkbox:checked").length === 0 && !(window.location.href.indexOf("products/?michsci_category") >= 0)){
+        if($("#tagBox :checkbox:checked").length === 0 && !(window.location.href.indexOf("products-2/?michsci_category") >= 0)){
             $("#categoriesGridView").show();
             $("#categoriesListView").show();
             $("#gridView").css("display", "none");
index d40484b..79ddb6b 100644 (file)
@@ -3,7 +3,7 @@ $(document).ready(function () {
     "use strict";
     document.cookie = "catView=grid";
     // don't display products on the main "products page"
-    if ((window.location.href.indexOf("products") >= 0)){
+    if ((window.location.href.indexOf("products-2") >= 0)){
         $("#gridView").css("display", "none");
         $("#listView").css("display", "none");
         $("#grid").on("click", function (e) {
@@ -16,7 +16,7 @@ $(document).ready(function () {
         });
     }
     // hide product display initially
-    if ((window.location.href.indexOf("products/?michsci_category") >= 0)){
+    if ((window.location.href.indexOf("products-2/?michsci_category") >= 0)){
         $("#productsView").css("display", "inherit");
         $("#categoriesView").css("display", "none");
         $("#gridView").css("display", "inherit");
@@ -26,7 +26,7 @@ $(document).ready(function () {
     }
     
     // navigate back to products page if on single product page
-    if ((window.location.href.indexOf("products/?pagename") >= 0)) {
+    if ((window.location.href.indexOf("products-2/?pagename") >= 0)) {
 //        $("#viewBtns").css("display", "none");
         $("#grid").on("click", function (e) {
             document.cookie = "view=grid";
@@ -38,7 +38,7 @@ $(document).ready(function () {
         });
     }
     // change output view from list to grid
-    if (!(window.location.href.indexOf("products/?pagename") >= 0)) {
+    if (!(window.location.href.indexOf("products-2/?pagename") >= 0)) {
     $("#grid").on("click", function (e) {
         document.cookie = "view=grid";
         location.reload();
@@ -67,7 +67,7 @@ $(document).ready(function () {
             $("." + $(this).val()).show();
         });
         // hide products on front page, show all products if on products page
-        if($("#tagBox :checkbox:checked").length === 0 && !(window.location.href.indexOf("products/?michsci_category") >= 0)){
+        if($("#tagBox :checkbox:checked").length === 0 && !(window.location.href.indexOf("products-2/?michsci_category") >= 0)){
             $("#categoriesGridView").show();
             $("#categoriesListView").show();
             $("#gridView").css("display", "none");