diff options
author | Jérémy Benoist <j0k3r@users.noreply.github.com> | 2020-05-13 05:05:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-13 05:05:15 +0200 |
commit | bf7cf20b442c6bf7ea9b9407478fee1c1037e3d1 (patch) | |
tree | 56eca455cc3ad80e73b7bdfce88a5a25b84c21e1 /app/Resources | |
parent | 29e16095f4816ffd0c24ffbda7eeccb74253e4fb (diff) | |
parent | a5ac6046838766eb888180b4f1d0717631ed8f14 (diff) | |
download | wallabag-bf7cf20b442c6bf7ea9b9407478fee1c1037e3d1.tar.gz wallabag-bf7cf20b442c6bf7ea9b9407478fee1c1037e3d1.tar.zst wallabag-bf7cf20b442c6bf7ea9b9407478fee1c1037e3d1.zip |
Merge pull request #4385 from Simounet/feat/side-nav-hidden-mobile-add-tag
Side nav hidden on mobile tag adding
Diffstat (limited to 'app/Resources')
-rwxr-xr-x | app/Resources/static/themes/material/index.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Resources/static/themes/material/index.js b/app/Resources/static/themes/material/index.js index d8f5628c..2414c0fc 100755 --- a/app/Resources/static/themes/material/index.js +++ b/app/Resources/static/themes/material/index.js | |||
@@ -17,6 +17,8 @@ import './js/shortcuts/entry'; | |||
17 | /* Theme style */ | 17 | /* Theme style */ |
18 | import './css/index.scss'; | 18 | import './css/index.scss'; |
19 | 19 | ||
20 | const mobileMaxWidth = 993; | ||
21 | |||
20 | const stickyNav = () => { | 22 | const stickyNav = () => { |
21 | const nav = $('.js-entry-nav-top'); | 23 | const nav = $('.js-entry-nav-top'); |
22 | $('[data-toggle="actions"]').click(() => { | 24 | $('[data-toggle="actions"]').click(() => { |
@@ -81,6 +83,9 @@ $(document).ready(() => { | |||
81 | $('#nav-btn-add-tag').on('click', () => { | 83 | $('#nav-btn-add-tag').on('click', () => { |
82 | $('.nav-panel-add-tag').toggle(100); | 84 | $('.nav-panel-add-tag').toggle(100); |
83 | $('.nav-panel-menu').addClass('hidden'); | 85 | $('.nav-panel-menu').addClass('hidden'); |
86 | if (window.innerWidth < mobileMaxWidth) { | ||
87 | $('.side-nav').sideNav('hide'); | ||
88 | } | ||
84 | $('#tag_label').focus(); | 89 | $('#tag_label').focus(); |
85 | return false; | 90 | return false; |
86 | }); | 91 | }); |