aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/Resources/static
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2018-10-15 08:32:59 +0000
committerGitHub <noreply@github.com>2018-10-15 08:32:59 +0000
commite673b54f702f274a087e4feff409663d9636e57b (patch)
tree094dffaffc7f3f9ed1513e939083a922ee00b0cc /app/Resources/static
parent5bb01c034424b56a0a0ae4bc34ae5bb9a514deba (diff)
parent84d59603c53878bfba32a8fb846d3c00e756c4f1 (diff)
downloadwallabag-e673b54f702f274a087e4feff409663d9636e57b.tar.gz
wallabag-e673b54f702f274a087e4feff409663d9636e57b.tar.zst
wallabag-e673b54f702f274a087e4feff409663d9636e57b.zip
Merge pull request #3574 from shulard/feature/rename-tags
Allow to rename tags from the web interface.
Diffstat (limited to 'app/Resources/static')
-rw-r--r--app/Resources/static/themes/_global/index.js19
-rw-r--r--app/Resources/static/themes/baggy/css/layout.scss11
-rw-r--r--app/Resources/static/themes/material/css/cards.scss11
3 files changed, 40 insertions, 1 deletions
diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js
index ae598e56..bb3e95b6 100644
--- a/app/Resources/static/themes/_global/index.js
+++ b/app/Resources/static/themes/_global/index.js
@@ -70,4 +70,23 @@ $(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 });
73}); 92});
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/material/css/cards.scss b/app/Resources/static/themes/material/css/cards.scss
index 8f7f8f7b..f3319f3d 100644
--- a/app/Resources/static/themes/material/css/cards.scss
+++ b/app/Resources/static/themes/material/css/cards.scss
@@ -180,6 +180,17 @@ a.original:not(.waves-effect) {
180 flex-grow: 1; 180 flex-grow: 1;
181} 181}
182 182
183.card-tag-form {
184 display: flex;
185 min-width: 100px;
186 flex-grow: 1;
187}
188
189.card-tag-form input {
190 margin-bottom: 0;
191 height: 2rem;
192}
193
183.card-tag-rss { 194.card-tag-rss {
184 display: flex; 195 display: flex;
185} 196}