aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static
diff options
context:
space:
mode:
Diffstat (limited to 'app/Resources/static')
-rw-r--r--app/Resources/static/themes/_global/index.js37
-rw-r--r--app/Resources/static/themes/baggy/css/article.scss6
-rw-r--r--app/Resources/static/themes/baggy/css/layout.scss11
-rw-r--r--app/Resources/static/themes/baggy/css/pictos.scss2
-rw-r--r--app/Resources/static/themes/material/css/cards.scss11
-rwxr-xr-xapp/Resources/static/themes/material/index.js9
-rw-r--r--app/Resources/static/themes/material/js/tools.js14
7 files changed, 83 insertions, 7 deletions
diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js
index ae598e56..9ad96fc0 100644
--- a/app/Resources/static/themes/_global/index.js
+++ b/app/Resources/static/themes/_global/index.js
@@ -70,4 +70,41 @@ $(document).ready(() => {
70 retrievePercent(x.entryId, true); 70 retrievePercent(x.entryId, true);
71 }); 71 });
72 } 72 }
73
74 document.querySelectorAll('[data-handler=tag-rename]').forEach((item) => {
75 const current = item;
76 current.wallabag_edit_mode = false;
77 current.onclick = (event) => {
78 const target = event.currentTarget;
79
80 if (target.wallabag_edit_mode === false) {
81 $(target.parentNode.querySelector('[data-handle=tag-link]')).addClass('hidden');
82 $(target.parentNode.querySelector('[data-handle=tag-rename-form]')).removeClass('hidden');
83 target.parentNode.querySelector('[data-handle=tag-rename-form] input').focus();
84 target.querySelector('.material-icons').innerHTML = 'done';
85
86 target.wallabag_edit_mode = true;
87 } else {
88 target.parentNode.querySelector('[data-handle=tag-rename-form]').submit();
89 }
90 };
91 });
92
93 // mimic radio button because emailTwoFactor is a boolean
94 $('#update_user_googleTwoFactor').on('change', () => {
95 $('#update_user_emailTwoFactor').prop('checked', false);
96 });
97
98 $('#update_user_emailTwoFactor').on('change', () => {
99 $('#update_user_googleTwoFactor').prop('checked', false);
100 });
101
102 // same mimic for super admin
103 $('#user_googleTwoFactor').on('change', () => {
104 $('#user_emailTwoFactor').prop('checked', false);
105 });
106
107 $('#user_emailTwoFactor').on('change', () => {
108 $('#user_googleTwoFactor').prop('checked', false);
109 });
73}); 110});
diff --git a/app/Resources/static/themes/baggy/css/article.scss b/app/Resources/static/themes/baggy/css/article.scss
index 9094ad55..d203ce31 100644
--- a/app/Resources/static/themes/baggy/css/article.scss
+++ b/app/Resources/static/themes/baggy/css/article.scss
@@ -85,7 +85,7 @@ blockquote {
85 color: #999; 85 color: #999;
86} 86}
87 87
88.icon-rss { 88.icon-feed {
89 background-color: #000; 89 background-color: #000;
90 color: #fff; 90 color: #fff;
91 padding: 0.2em 0.5em; 91 padding: 0.2em 0.5em;
@@ -101,8 +101,8 @@ blockquote {
101 margin-bottom: 0.5em; 101 margin-bottom: 0.5em;
102 } 102 }
103 103
104 .icon-rss:hover, 104 .icon-feed:hover,
105 .icon-rss:focus { 105 .icon-feed:focus {
106 background-color: #fff; 106 background-color: #fff;
107 color: #000; 107 color: #000;
108 text-decoration: none; 108 text-decoration: none;
diff --git a/app/Resources/static/themes/baggy/css/layout.scss b/app/Resources/static/themes/baggy/css/layout.scss
index cb14e62d..0293ebe5 100644
--- a/app/Resources/static/themes/baggy/css/layout.scss
+++ b/app/Resources/static/themes/baggy/css/layout.scss
@@ -295,6 +295,15 @@ div.pagination ul {
295 } 295 }
296} 296}
297 297
298.hide { 298.card-tag-form {
299 display: inline-block;
300}
301
302.card-tag-form input[type="text"] {
303 min-width: 20em;
304}
305
306.hide,
307.hidden {
299 display: none; 308 display: none;
300} 309}
diff --git a/app/Resources/static/themes/baggy/css/pictos.scss b/app/Resources/static/themes/baggy/css/pictos.scss
index 2ff01937..b6ebf311 100644
--- a/app/Resources/static/themes/baggy/css/pictos.scss
+++ b/app/Resources/static/themes/baggy/css/pictos.scss
@@ -136,7 +136,7 @@
136 content: "\ea3a"; 136 content: "\ea3a";
137} 137}
138 138
139.icon-rss::before { 139.icon-feed::before {
140 content: "\e808"; 140 content: "\e808";
141} 141}
142 142
diff --git a/app/Resources/static/themes/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss
index 0cdc7457..9ae1be82 100644
--- a/app/Resources/static/themes/material/css/cards.scss
+++ b/app/Resources/static/themes/material/css/cards.scss
@@ -197,6 +197,17 @@ a.original:not(.waves-effect) {
197 flex-grow: 1; 197 flex-grow: 1;
198} 198}
199 199
200.card-tag-form {
201 display: flex;
202 min-width: 100px;
203 flex-grow: 1;
204}
205
206.card-tag-form input {
207 margin-bottom: 0;
208 height: 2rem;
209}
210
200.card-tag-rss { 211.card-tag-rss {
201 display: flex; 212 display: flex;
202} 213}
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js
index 96310d81..2926cad1 100755
--- a/app/Resources/static/themes/material/index.js
+++ b/app/Resources/static/themes/material/index.js
@@ -8,7 +8,7 @@ import 'materialize-css/dist/js/materialize';
8import '../_global/index'; 8import '../_global/index';
9 9
10/* Tools */ 10/* Tools */
11import { initExport, initFilters } from './js/tools'; 11import { initExport, initFilters, initRandom } from './js/tools';
12 12
13/* Import shortcuts */ 13/* Import shortcuts */
14import './js/shortcuts/main'; 14import './js/shortcuts/main';
@@ -32,8 +32,10 @@ $(document).ready(() => {
32 format: 'dd/mm/yyyy', 32 format: 'dd/mm/yyyy',
33 container: 'body', 33 container: 'body',
34 }); 34 });
35
35 initFilters(); 36 initFilters();
36 initExport(); 37 initExport();
38 initRandom();
37 39
38 const toggleNav = (toShow, toFocus) => { 40 const toggleNav = (toShow, toFocus) => {
39 $('.nav-panel-actions').hide(100); 41 $('.nav-panel-actions').hide(100);
@@ -48,25 +50,30 @@ $(document).ready(() => {
48 $('#tag_label').focus(); 50 $('#tag_label').focus();
49 return false; 51 return false;
50 }); 52 });
53
51 $('#nav-btn-add').on('click', () => { 54 $('#nav-btn-add').on('click', () => {
52 toggleNav('.nav-panel-add', '#entry_url'); 55 toggleNav('.nav-panel-add', '#entry_url');
53 return false; 56 return false;
54 }); 57 });
58
55 const materialAddForm = $('.nav-panel-add'); 59 const materialAddForm = $('.nav-panel-add');
56 materialAddForm.on('submit', () => { 60 materialAddForm.on('submit', () => {
57 materialAddForm.addClass('disabled'); 61 materialAddForm.addClass('disabled');
58 $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur'); 62 $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur');
59 }); 63 });
64
60 $('#nav-btn-search').on('click', () => { 65 $('#nav-btn-search').on('click', () => {
61 toggleNav('.nav-panel-search', '#search_entry_term'); 66 toggleNav('.nav-panel-search', '#search_entry_term');
62 return false; 67 return false;
63 }); 68 });
69
64 $('.close').on('click', (e) => { 70 $('.close').on('click', (e) => {
65 $(e.target).parent('.nav-panel-item').hide(100); 71 $(e.target).parent('.nav-panel-item').hide(100);
66 $('.nav-panel-actions').show(100); 72 $('.nav-panel-actions').show(100);
67 $('.nav-panels').css('background', 'transparent'); 73 $('.nav-panels').css('background', 'transparent');
68 return false; 74 return false;
69 }); 75 });
76
70 $(window).scroll(() => { 77 $(window).scroll(() => {
71 const s = $(window).scrollTop(); 78 const s = $(window).scrollTop();
72 const d = $(document).height(); 79 const d = $(document).height();
diff --git a/app/Resources/static/themes/material/js/tools.js b/app/Resources/static/themes/material/js/tools.js
index 39398fd8..0b3d3038 100644
--- a/app/Resources/static/themes/material/js/tools.js
+++ b/app/Resources/static/themes/material/js/tools.js
@@ -8,6 +8,7 @@ function initFilters() {
8 $('#clear_form_filters').on('click', () => { 8 $('#clear_form_filters').on('click', () => {
9 $('#filters input').val(''); 9 $('#filters input').val('');
10 $('#filters :checked').removeAttr('checked'); 10 $('#filters :checked').removeAttr('checked');
11
11 return false; 12 return false;
12 }); 13 });
13 } 14 }
@@ -21,4 +22,15 @@ function initExport() {
21 } 22 }
22} 23}
23 24
24export { initExport, initFilters }; 25function initRandom() {
26 // no display if export (ie: entries) not available
27 if ($('div').is('#export')) {
28 $('#button_random').show();
29 }
30}
31
32export {
33 initExport,
34 initFilters,
35 initRandom,
36};