From ccba4b909079824677db22f7fcca4d79f8941bd0 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Wed, 13 Jan 2016 15:20:53 -0500 Subject: [PATCH] testing features checkbox hide and show for appearance menu pages --- js/app.js | 18 ++++++++++++++---- js/custom/upcp.js | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/js/app.js b/js/app.js index 140c383..8107911 100644 --- a/js/app.js +++ b/js/app.js @@ -82,8 +82,6 @@ $(document).ready(function () { $("#categoriesListView").css("display", "none"); $("#blog-side-info-wrapper").insertBefore("#gridView"); } - - // remove for testing // navigate back to products page if on single product page if ((window.location.href.indexOf("products-2/?pagename") >= 0)) { @@ -142,7 +140,7 @@ $(document).ready(function () { $("#gridView").css("display", "inherit"); $("#listView").css("display", "inherit"); $("#categoriesGridView").hide(); - $("#categoriesListView").hide() + $("#categoriesListView").hide(); $("#tagBox :checkbox:checked").each(function() { $("." + $(this).val()).show(); }); @@ -152,10 +150,22 @@ $(document).ready(function () { $("#categoriesListView").show(); $("#gridView").css("display", "none"); $("#listView").css("display", "none"); + } else if ($("#tagBox :checkbox:checked").length === 0){ $(".product").show(); } + if($("#tagBox :checkbox:checked").length === 0 && window.location.href.indexOf("products-3/") >= 0){ +// $("#categoriesGridView").show(); +// $("#categoriesListView").show(); + $("#gridView").css("display", "inherit"); + $("#listView").css("display", "none"); + $(".product").show(); + } else if ($("#tagBox :checkbox:checked").length === 0){ +// $(".product").show(); + } }); + + // toggle search bar // $("#search-icon").click(function () { // $(".searchform").animate({width: 'toggle'}, 1000); @@ -200,7 +210,7 @@ $(document).ready(function () { $("#gridView").css("display", "inherit"); $("#listView").css("display", "inherit"); $("#categoriesGridView").hide(); - $("#categoriesListView").hide() + $("#categoriesListView").hide(); $("#tagBox :checkbox:checked").each(function() { $("." + $(this).val()).show(); }); diff --git a/js/custom/upcp.js b/js/custom/upcp.js index 323412d..d58bc3a 100644 --- a/js/custom/upcp.js +++ b/js/custom/upcp.js @@ -62,8 +62,6 @@ $(document).ready(function () { $("#categoriesListView").css("display", "none"); $("#blog-side-info-wrapper").insertBefore("#gridView"); } - - // remove for testing // navigate back to products page if on single product page if ((window.location.href.indexOf("products-2/?pagename") >= 0)) { @@ -122,7 +120,7 @@ $(document).ready(function () { $("#gridView").css("display", "inherit"); $("#listView").css("display", "inherit"); $("#categoriesGridView").hide(); - $("#categoriesListView").hide() + $("#categoriesListView").hide(); $("#tagBox :checkbox:checked").each(function() { $("." + $(this).val()).show(); }); @@ -132,10 +130,22 @@ $(document).ready(function () { $("#categoriesListView").show(); $("#gridView").css("display", "none"); $("#listView").css("display", "none"); + } else if ($("#tagBox :checkbox:checked").length === 0){ $(".product").show(); } + if($("#tagBox :checkbox:checked").length === 0 && window.location.href.indexOf("products-3/") >= 0){ +// $("#categoriesGridView").show(); +// $("#categoriesListView").show(); + $("#gridView").css("display", "inherit"); + $("#listView").css("display", "none"); + $(".product").show(); + } else if ($("#tagBox :checkbox:checked").length === 0){ +// $(".product").show(); + } }); + + // toggle search bar // $("#search-icon").click(function () { // $(".searchform").animate({width: 'toggle'}, 1000); @@ -180,7 +190,7 @@ $(document).ready(function () { $("#gridView").css("display", "inherit"); $("#listView").css("display", "inherit"); $("#categoriesGridView").hide(); - $("#categoriesListView").hide() + $("#categoriesListView").hide(); $("#tagBox :checkbox:checked").each(function() { $("." + $(this).val()).show(); }); -- 2.17.1