From e92e306bdc820f5aa9c9ce9660b336d7a5319db2 Mon Sep 17 00:00:00 2001 From: kilo Date: Fri, 14 Jul 2017 09:36:45 +0200 Subject: [PATCH] Make category in refine update based on category in header --- public/js/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/js/main.js b/public/js/main.js index 6a194914..6d9b3bf3 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -83,6 +83,8 @@ document.getElementsByClassName("form-input refine")[0].addEventListener("click" document.getElementsByClassName("box refine")[0].style.display = document.getElementsByClassName("box refine")[0].style.display == "none" ? "block" : "none"; if(document.getElementsByClassName("form-input refine-searchbox")[0].value != document.getElementsByClassName("form-input search-box")[0].value) document.getElementsByClassName("form-input refine-searchbox")[0].value = document.getElementsByClassName("form-input search-box")[0].value; - e.preventDefault(); + if(document.getElementsByClassName("form-input refine-category")[0].value != document.getElementsByClassName("form-input form-category")[0].value) + document.getElementsByClassName("form-input refine-category")[0].value = document.getElementsByClassName("form-input form-category")[0].value; + e.preventDefault(); }); // @license-end