From 32968bd30e907dcb681831c149a9afcc12a664da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20HULARD?= Date: Wed, 24 Jan 2018 17:30:06 +0100 Subject: Add specific styles for the card tag form element. Also add a `.hidden` class in the baggy theme to have consistency with material. --- app/Resources/static/themes/material/css/cards.scss | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'app/Resources/static/themes/material') 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) { flex-grow: 1; } +.card-tag-form { + display: flex; + min-width: 100px; + flex-grow: 1; +} + +.card-tag-form input { + margin-bottom: 0; + height: 2rem; +} + .card-tag-rss { display: flex; } -- cgit v1.2.3 From 50f35f0db2be9586205e793f315608eec59c9666 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 19 Jan 2019 22:08:29 +0100 Subject: Move icon into the top menu bar Change the way to select a random entry: - select all ids from the given user (with filters) - choose randomly one in php - find that entry --- app/Resources/static/themes/material/index.js | 4 +++- app/Resources/static/themes/material/js/tools.js | 14 +++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 96310d81..05794597 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'; import '../_global/index'; /* Tools */ -import { initExport, initFilters } from './js/tools'; +import { initExport, initFilters, initRandom } from './js/tools'; /* Import shortcuts */ import './js/shortcuts/main'; @@ -32,8 +32,10 @@ $(document).ready(() => { format: 'dd/mm/yyyy', container: 'body', }); + initFilters(); initExport(); + initRandom(); const toggleNav = (toShow, toFocus) => { $('.nav-panel-actions').hide(100); 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() { $('#clear_form_filters').on('click', () => { $('#filters input').val(''); $('#filters :checked').removeAttr('checked'); + return false; }); } @@ -21,4 +22,15 @@ function initExport() { } } -export { initExport, initFilters }; +function initRandom() { + // no display if export (ie: entries) not available + if ($('div').is('#export')) { + $('#button_random').show(); + } +} + +export { + initExport, + initFilters, + initRandom, +}; -- 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/material/index.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/Resources/static/themes/material') diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index 05794597..2926cad1 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js @@ -50,25 +50,30 @@ $(document).ready(() => { $('#tag_label').focus(); return false; }); + $('#nav-btn-add').on('click', () => { toggleNav('.nav-panel-add', '#entry_url'); return false; }); + const materialAddForm = $('.nav-panel-add'); materialAddForm.on('submit', () => { materialAddForm.addClass('disabled'); $('input#entry_url', materialAddForm).prop('readonly', true).trigger('blur'); }); + $('#nav-btn-search').on('click', () => { toggleNav('.nav-panel-search', '#search_entry_term'); return false; }); + $('.close').on('click', (e) => { $(e.target).parent('.nav-panel-item').hide(100); $('.nav-panel-actions').show(100); $('.nav-panels').css('background', 'transparent'); return false; }); + $(window).scroll(() => { const s = $(window).scrollTop(); const d = $(document).height(); -- cgit v1.2.3