From 9b0aef9171389aa9cdc39e8434df0f912ee5bdae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20HULARD?= Date: Wed, 24 Jan 2018 17:29:26 +0100 Subject: Update tag list template to allow renaming. * Add a form on each tag to handle rename action. * Add JavaScript to handle action on the corresponding page inside the global index.js file. * Add support for the 2 active themes : material / baggy The form solution is cleaner than an Ajax one because it let the browser validate input data and make the POST easier without the need to handle JSON response. --- app/Resources/static/themes/_global/index.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'app/Resources/static/themes/_global/index.js') 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(() => { retrievePercent(x.entryId, true); }); } + + document.querySelectorAll('[data-handler=tag-rename]').forEach((item) => { + const current = item; + current.wallabag_edit_mode = false; + current.onclick = (event) => { + const target = event.currentTarget; + + if (target.wallabag_edit_mode === false) { + $(target.parentNode.querySelector('[data-handle=tag-link]')).addClass('hidden'); + $(target.parentNode.querySelector('[data-handle=tag-rename-form]')).removeClass('hidden'); + target.parentNode.querySelector('[data-handle=tag-rename-form] input').focus(); + target.querySelector('.material-icons').innerHTML = 'done'; + + target.wallabag_edit_mode = true; + } else { + target.parentNode.querySelector('[data-handle=tag-rename-form]').submit(); + } + }; + }); }); -- cgit v1.2.3 From a6b242a1fd6f8900d80354361449f1bf62506ef9 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 2 Dec 2018 12:43:05 +0100 Subject: Enable OTP 2FA - Update SchebTwoFactorBundle to version 3 - Enable Google 2fa on the bundle - Disallow ability to use both email and google as 2fa - Update Ocramius Proxy Manager to handle typed function & attributes (from PHP 7) - use `$this->addFlash` shortcut instead of `$this->get('session')->getFlashBag()->add` - update admin to be able to create/reset the 2fa --- app/Resources/static/themes/_global/index.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'app/Resources/static/themes/_global/index.js') diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js index bb3e95b6..9ad96fc0 100644 --- a/app/Resources/static/themes/_global/index.js +++ b/app/Resources/static/themes/_global/index.js @@ -89,4 +89,22 @@ $(document).ready(() => { } }; }); + + // mimic radio button because emailTwoFactor is a boolean + $('#update_user_googleTwoFactor').on('change', () => { + $('#update_user_emailTwoFactor').prop('checked', false); + }); + + $('#update_user_emailTwoFactor').on('change', () => { + $('#update_user_googleTwoFactor').prop('checked', false); + }); + + // same mimic for super admin + $('#user_googleTwoFactor').on('change', () => { + $('#user_emailTwoFactor').prop('checked', false); + }); + + $('#user_emailTwoFactor').on('change', () => { + $('#user_googleTwoFactor').prop('checked', false); + }); }); -- cgit v1.2.3 From 66fa0c26ab74467645e2cc63a4f48ef82e3f5748 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 9 Jul 2019 13:22:50 +0200 Subject: Copy client info to clipboard From the listing page and the create summary page, you can now copy client info to the clipboard using dedicated buttons. --- app/Resources/static/themes/_global/index.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/Resources/static/themes/_global/index.js') diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js index 9ad96fc0..66ac063b 100644 --- a/app/Resources/static/themes/_global/index.js +++ b/app/Resources/static/themes/_global/index.js @@ -4,6 +4,8 @@ import $ from 'jquery'; /* Annotations */ import annotator from 'annotator'; +import ClipboardJS from 'clipboard'; + /* Fonts */ import 'material-design-icons-iconfont/dist/material-design-icons.css'; import 'lato-font/css/lato-font.css'; @@ -107,4 +109,12 @@ $(document).ready(() => { $('#user_emailTwoFactor').on('change', () => { $('#user_googleTwoFactor').prop('checked', false); }); + + // handle copy to clipboard for developer stuff + const clipboard = new ClipboardJS('.btn'); + clipboard.on('success', (e) => { + console.info(e.text); + + e.clearSelection(); + }); }); -- cgit v1.2.3 From df45126a1475ea2051a8285d89f3693c0bc61cd3 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 9 Jul 2019 15:54:59 +0200 Subject: Update translations Remove log --- app/Resources/static/themes/_global/index.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'app/Resources/static/themes/_global/index.js') diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js index 66ac063b..315fc0ad 100644 --- a/app/Resources/static/themes/_global/index.js +++ b/app/Resources/static/themes/_global/index.js @@ -113,8 +113,6 @@ $(document).ready(() => { // handle copy to clipboard for developer stuff const clipboard = new ClipboardJS('.btn'); clipboard.on('success', (e) => { - console.info(e.text); - e.clearSelection(); }); }); -- cgit v1.2.3 From 2f5fa30aadf1ae3394750b6b8a6b2492609d3f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 27 Sep 2019 16:01:55 +0200 Subject: Added MathJax support --- app/Resources/static/themes/_global/index.js | 1 + 1 file changed, 1 insertion(+) (limited to 'app/Resources/static/themes/_global/index.js') diff --git a/app/Resources/static/themes/_global/index.js b/app/Resources/static/themes/_global/index.js index 315fc0ad..88365270 100644 --- a/app/Resources/static/themes/_global/index.js +++ b/app/Resources/static/themes/_global/index.js @@ -5,6 +5,7 @@ import $ from 'jquery'; import annotator from 'annotator'; import ClipboardJS from 'clipboard'; +import 'mathjax/es5/tex-svg'; /* Fonts */ import 'material-design-icons-iconfont/dist/material-design-icons.css'; -- cgit v1.2.3