From 41aa00c0c0332440e9ba682ad014362f6f6d7dcd Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Fri, 18 Dec 2015 14:33:44 -0500 Subject: [PATCH] added conditional to remove view icons per page --- js/app.js | 5 +++++ js/custom/upcp.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/js/app.js b/js/app.js index 3d0b70d..186702b 100644 --- a/js/app.js +++ b/js/app.js @@ -21,6 +21,11 @@ $(document).ready(function () { ;/*global document, window, alert, console, require*/ $(document).ready(function () { "use strict"; + + if ((window.location.href.indexOf("products/?pagename") >= 0)) { + $("#viewBtns").css("display", "none"); + } + $("#list").on("click", function (e) { document.cookie = "view=list"; location.reload(); diff --git a/js/custom/upcp.js b/js/custom/upcp.js index 55ba6da..eec3de2 100644 --- a/js/custom/upcp.js +++ b/js/custom/upcp.js @@ -1,6 +1,11 @@ /*global document, window, alert, console, require*/ $(document).ready(function () { "use strict"; + + if ((window.location.href.indexOf("products/?pagename") >= 0)) { + $("#viewBtns").css("display", "none"); + } + $("#list").on("click", function (e) { document.cookie = "view=list"; location.reload(); -- 2.17.1