]>
git.immae.eu Git - github/wallabag/wallabag.git/blob - app/Resources/static/themes/baggy/js/popupForm.js
1 var $ = global
.jquery
= require('jquery');
3 $(document
).ready(function () {
4 $('#search-form').hide();
5 $('#bagit-form').hide();
6 $('#filter-form').hide();
7 $('#download-form').hide();
9 //---------------------------------------------------------------------------
10 // Toggle the 'Search' popup in the sidebar
11 //---------------------------------------------------------------------------
12 function toggleSearch() {
13 $('#search-form').toggle();
14 $('#search').toggleClass('current');
15 $('#search').toggleClass('active-current');
16 $('#search-arrow').toggleClass('arrow-down');
17 if ($('#search').hasClass('current')) {
18 $('#content').addClass('opacity03');
20 $('#content').removeClass('opacity03');
24 //---------------------------------------------------------------------------
25 // Toggle the 'Filter' popup on entries list
26 //---------------------------------------------------------------------------
27 function toggleFilter() {
28 $('#filter-form').toggle();
31 //---------------------------------------------------------------------------
32 // Toggle the 'Download' popup on entries list
33 //---------------------------------------------------------------------------
34 function toggleDownload() {
35 $('#download-form').toggle();
38 //---------------------------------------------------------------------------
39 // Toggle the 'Save a Link' popup in the sidebar
40 //---------------------------------------------------------------------------
41 function toggleBagit() {
42 $('#bagit-form').toggle();
43 $('#bagit').toggleClass('current');
44 $('#bagit').toggleClass('active-current');
45 $('#bagit-arrow').toggleClass('arrow-down');
46 if ($('#bagit').hasClass('current')) {
47 $('#content').addClass('opacity03');
49 $('#content').removeClass('opacity03');
53 //---------------------------------------------------------------------------
54 // Close all #links popups in the sidebar
55 //---------------------------------------------------------------------------
56 function closePopups() {
57 $('#links .messages').hide();
58 $('#links > li > a').removeClass('active-current');
59 $('#links > li > a').removeClass('current');
60 $('[id$=-arrow]').removeClass('arrow-down');
61 $('#content').removeClass('opacity03');
64 $('#search').click(function () {
67 $('#searchfield').focus();
70 $('.filter-btn').click(function () {
75 $('.download-btn').click(function () {
80 $('#bagit').click(function () {
83 $('#plainurl').focus();
86 $('#search-form-close').click(function () {
90 $('#filter-form-close').click(function () {
94 $('#download-form-close').click(function () {
98 $('#bagit-form-close').click(function () {