mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Merge pull request #4385 from Simounet/feat/side-nav-hidden-mobile-add-tag
Side nav hidden on mobile tag adding
This commit is contained in:
commit
bf7cf20b44
2 changed files with 6 additions and 1 deletions
|
@ -17,6 +17,8 @@ import './js/shortcuts/entry';
|
||||||
/* Theme style */
|
/* Theme style */
|
||||||
import './css/index.scss';
|
import './css/index.scss';
|
||||||
|
|
||||||
|
const mobileMaxWidth = 993;
|
||||||
|
|
||||||
const stickyNav = () => {
|
const stickyNav = () => {
|
||||||
const nav = $('.js-entry-nav-top');
|
const nav = $('.js-entry-nav-top');
|
||||||
$('[data-toggle="actions"]').click(() => {
|
$('[data-toggle="actions"]').click(() => {
|
||||||
|
@ -81,6 +83,9 @@ $(document).ready(() => {
|
||||||
$('#nav-btn-add-tag').on('click', () => {
|
$('#nav-btn-add-tag').on('click', () => {
|
||||||
$('.nav-panel-add-tag').toggle(100);
|
$('.nav-panel-add-tag').toggle(100);
|
||||||
$('.nav-panel-menu').addClass('hidden');
|
$('.nav-panel-menu').addClass('hidden');
|
||||||
|
if (window.innerWidth < mobileMaxWidth) {
|
||||||
|
$('.side-nav').sideNav('hide');
|
||||||
|
}
|
||||||
$('#tag_label').focus();
|
$('#tag_label').focus();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue