]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - app/Resources/static/themes/baggy/js/popupForm.js
manage assets through npm
[github/wallabag/wallabag.git] / app / Resources / static / themes / baggy / js / popupForm.js
similarity index 83%
rename from src/Wallabag/CoreBundle/Resources/public/themes/baggy/js/popupForm.js
rename to app/Resources/static/themes/baggy/js/popupForm.js
index b933acd1103005375dc1ab62340bc04a4d740641..0b478fadd50e5a9634b353310fe79ae396dc9cd5 100644 (file)
@@ -3,6 +3,7 @@ $(document).ready(function() {
     $("#search-form").hide();
     $("#bagit-form").hide();
     $("#filter-form").hide();
+    $("#download-form").hide();
 
     //---------------------------------------------------------------------------
     // Toggle the "Search" popup in the sidebar
@@ -26,6 +27,13 @@ $(document).ready(function() {
         $("#filter-form").toggle();
     }
 
+    //---------------------------------------------------------------------------
+    // Toggle the "Download" popup on entries list
+    //---------------------------------------------------------------------------
+    function toggleDownload() {
+        $("#download-form").toggle();
+    }
+
     //---------------------------------------------------------------------------
     // Toggle the "Save a Link" popup in the sidebar
     //---------------------------------------------------------------------------
@@ -58,11 +66,16 @@ $(document).ready(function() {
         $("#searchfield").focus();
     });
 
-    $("#filter").click(function(){
+    $(".filter-btn").click(function(){
         closePopups();
         toggleFilter();
     });
 
+    $(".download-btn").click(function(){
+        closePopups();
+        toggleDownload();
+    });
+
     $("#bagit").click(function(){
         closePopups();
         toggleBagit();
@@ -77,6 +90,10 @@ $(document).ready(function() {
         toggleFilter();
     });
 
+    $("#download-form-close").click(function(){
+        toggleDownload();
+    });
+
     $("#bagit-form-close").click(function(){
         toggleBagit();
     });