From d2fcbf5d846eabb89714f4c59ff6729e2666a948 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Mon, 24 Aug 2015 20:43:29 +0200 Subject: Handle filter form using some JS Instead of displaying an ugly form --- .../views/themes/baggy/public/js/popupForm.js | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'src/Wallabag/CoreBundle/Resources/views/themes/baggy/public/js') diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/public/js/popupForm.js b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/public/js/popupForm.js index d233e600..b933acd1 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/public/js/popupForm.js +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/public/js/popupForm.js @@ -2,6 +2,7 @@ $(document).ready(function() { $("#search-form").hide(); $("#bagit-form").hide(); + $("#filter-form").hide(); //--------------------------------------------------------------------------- // Toggle the "Search" popup in the sidebar @@ -18,6 +19,13 @@ $(document).ready(function() { } } + //--------------------------------------------------------------------------- + // Toggle the "Filter" popup on entries list + //--------------------------------------------------------------------------- + function toggleFilter() { + $("#filter-form").toggle(); + } + //--------------------------------------------------------------------------- // Toggle the "Save a Link" popup in the sidebar //--------------------------------------------------------------------------- @@ -50,6 +58,11 @@ $(document).ready(function() { $("#searchfield").focus(); }); + $("#filter").click(function(){ + closePopups(); + toggleFilter(); + }); + $("#bagit").click(function(){ closePopups(); toggleBagit(); @@ -60,13 +73,11 @@ $(document).ready(function() { toggleSearch(); }); + $("#filter-form-close").click(function(){ + toggleFilter(); + }); + $("#bagit-form-close").click(function(){ toggleBagit(); }); - - // $("#").click(function(){ - // toggleSearch(); - // }); - - }); -- cgit v1.2.3