X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=app%2FResources%2Fstatic%2Fthemes%2Fbaggy%2Fjs%2FpopupForm.js;h=95ba60ee55feebe1b05f105671681478e72408ac;hb=0743287f955fd19fd1a04c91f3b40a4ac2236423;hp=0b478fadd50e5a9634b353310fe79ae396dc9cd5;hpb=5ecdfcd041767c9e3244a92bb0a6cc3c3f80fea3;p=github%2Fwallabag%2Fwallabag.git diff --git a/app/Resources/static/themes/baggy/js/popupForm.js b/app/Resources/static/themes/baggy/js/popupForm.js index 0b478fad..95ba60ee 100644 --- a/app/Resources/static/themes/baggy/js/popupForm.js +++ b/app/Resources/static/themes/baggy/js/popupForm.js @@ -1,100 +1,101 @@ -$(document).ready(function() { +var $ = global.jquery = require('jquery'); - $("#search-form").hide(); - $("#bagit-form").hide(); - $("#filter-form").hide(); - $("#download-form").hide(); +$(document).ready(function () { + $('#search-form').hide(); + $('#bagit-form').hide(); + $('#filter-form').hide(); + $('#download-form').hide(); - //--------------------------------------------------------------------------- - // Toggle the "Search" popup in the sidebar - //--------------------------------------------------------------------------- - function toggleSearch() { - $("#search-form").toggle(); - $("#search").toggleClass("current"); - $("#search").toggleClass("active-current"); - $("#search-arrow").toggleClass("arrow-down"); - if ($("#search").hasClass("current")) { - $("#content").addClass("opacity03"); - } else { - $("#content").removeClass("opacity03"); - } + //--------------------------------------------------------------------------- + // Toggle the 'Search' popup in the sidebar + //--------------------------------------------------------------------------- + function toggleSearch() { + $('#search-form').toggle(); + $('#search').toggleClass('current'); + $('#search').toggleClass('active-current'); + $('#search-arrow').toggleClass('arrow-down'); + if ($('#search').hasClass('current')) { + $('#content').addClass('opacity03'); + } else { + $('#content').removeClass('opacity03'); } + } - //--------------------------------------------------------------------------- - // Toggle the "Filter" popup on entries list - //--------------------------------------------------------------------------- - function toggleFilter() { - $("#filter-form").toggle(); - } + //--------------------------------------------------------------------------- + // Toggle the 'Filter' popup on entries list + //--------------------------------------------------------------------------- + function toggleFilter() { + $('#filter-form').toggle(); + } - //--------------------------------------------------------------------------- - // Toggle the "Download" popup on entries list - //--------------------------------------------------------------------------- - function toggleDownload() { - $("#download-form").toggle(); - } + //--------------------------------------------------------------------------- + // Toggle the 'Download' popup on entries list + //--------------------------------------------------------------------------- + function toggleDownload() { + $('#download-form').toggle(); + } - //--------------------------------------------------------------------------- - // Toggle the "Save a Link" popup in the sidebar - //--------------------------------------------------------------------------- - function toggleBagit() { - $("#bagit-form").toggle(); - $("#bagit").toggleClass("current"); - $("#bagit").toggleClass("active-current"); - $("#bagit-arrow").toggleClass("arrow-down"); - if ($("#bagit").hasClass("current")) { - $("#content").addClass("opacity03"); - } else { - $("#content").removeClass("opacity03"); - } + //--------------------------------------------------------------------------- + // Toggle the 'Save a Link' popup in the sidebar + //--------------------------------------------------------------------------- + function toggleBagit() { + $('#bagit-form').toggle(); + $('#bagit').toggleClass('current'); + $('#bagit').toggleClass('active-current'); + $('#bagit-arrow').toggleClass('arrow-down'); + if ($('#bagit').hasClass('current')) { + $('#content').addClass('opacity03'); + } else { + $('#content').removeClass('opacity03'); } + } - //--------------------------------------------------------------------------- - // Close all #links popups in the sidebar - //--------------------------------------------------------------------------- - function closePopups() { - $("#links .messages").hide(); - $("#links > li > a").removeClass("active-current"); - $("#links > li > a").removeClass("current"); - $("[id$=-arrow]").removeClass("arrow-down"); - $("#content").removeClass("opacity03"); - } + //--------------------------------------------------------------------------- + // Close all #links popups in the sidebar + //--------------------------------------------------------------------------- + function closePopups() { + $('#links .messages').hide(); + $('#links > li > a').removeClass('active-current'); + $('#links > li > a').removeClass('current'); + $('[id$=-arrow]').removeClass('arrow-down'); + $('#content').removeClass('opacity03'); + } - $("#search").click(function(){ - closePopups(); - toggleSearch(); - $("#searchfield").focus(); - }); + $('#search').click(function () { + closePopups(); + toggleSearch(); + $('#searchfield').focus(); + }); - $(".filter-btn").click(function(){ - closePopups(); - toggleFilter(); - }); + $('.filter-btn').click(function () { + closePopups(); + toggleFilter(); + }); - $(".download-btn").click(function(){ - closePopups(); - toggleDownload(); - }); + $('.download-btn').click(function () { + closePopups(); + toggleDownload(); + }); - $("#bagit").click(function(){ - closePopups(); - toggleBagit(); - $("#plainurl").focus(); - }); + $('#bagit').click(function () { + closePopups(); + toggleBagit(); + $('#plainurl').focus(); + }); - $("#search-form-close").click(function(){ - toggleSearch(); - }); + $('#search-form-close').click(function () { + toggleSearch(); + }); - $("#filter-form-close").click(function(){ - toggleFilter(); - }); + $('#filter-form-close').click(function () { + toggleFilter(); + }); - $("#download-form-close").click(function(){ - toggleDownload(); - }); + $('#download-form-close').click(function () { + toggleDownload(); + }); - $("#bagit-form-close").click(function(){ - toggleBagit(); - }); + $('#bagit-form-close').click(function () { + toggleBagit(); + }); });