aboutsummaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rwxr-xr-xapp/Resources/static/themes/material/index.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js
index bdccc534..96310d81 100755
--- a/app/Resources/static/themes/material/index.js
+++ b/app/Resources/static/themes/material/index.js
@@ -35,6 +35,13 @@ $(document).ready(() => {
35 initFilters(); 35 initFilters();
36 initExport(); 36 initExport();
37 37
38 const toggleNav = (toShow, toFocus) => {
39 $('.nav-panel-actions').hide(100);
40 $(toShow).show(100);
41 $('.nav-panels').css('background', 'white');
42 $(toFocus).focus();
43 };
44
38 $('#nav-btn-add-tag').on('click', () => { 45 $('#nav-btn-add-tag').on('click', () => {
39 $('.nav-panel-add-tag').toggle(100); 46 $('.nav-panel-add-tag').toggle(100);
40 $('.nav-panel-menu').addClass('hidden'); 47 $('.nav-panel-menu').addClass('hidden');
@@ -42,10 +49,7 @@ $(document).ready(() => {
42 return false; 49 return false;
43 }); 50 });
44 $('#nav-btn-add').on('click', () => { 51 $('#nav-btn-add').on('click', () => {
45 $('.nav-panel-actions').hide(100); 52 toggleNav('.nav-panel-add', '#entry_url');
46 $('.nav-panel-add').show(100);
47 $('.nav-panels').css('background', 'white');
48 $('#entry_url').focus();
49 return false; 53 return false;
50 }); 54 });
51 const materialAddForm = $('.nav-panel-add'); 55 const materialAddForm = $('.nav-panel-add');
@@ -54,15 +58,11 @@ $(document).ready(() => {
54 $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur'); 58 $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur');
55 }); 59 });
56 $('#nav-btn-search').on('click', () => { 60 $('#nav-btn-search').on('click', () => {
57 $('.nav-panel-actions').hide(100); 61 toggleNav('.nav-panel-search', '#search_entry_term');
58 $('.nav-panel-search').show(100);
59 $('.nav-panels').css('background', 'white');
60 $('#search_entry_term').focus();
61 return false; 62 return false;
62 }); 63 });
63 $('.close').on('click', () => { 64 $('.close').on('click', (e) => {
64 $('.nav-panel-add').hide(100); 65 $(e.target).parent('.nav-panel-item').hide(100);
65 $('.nav-panel-search').hide(100);
66 $('.nav-panel-actions').show(100); 66 $('.nav-panel-actions').show(100);
67 $('.nav-panels').css('background', 'transparent'); 67 $('.nav-panels').css('background', 'transparent');
68 return false; 68 return false;