]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - app/Resources/static/themes/material/index.js
Sticky nav on entry action button click
[github/wallabag/wallabag.git] / app / Resources / static / themes / material / index.js
index 2926cad11c1d55fdaacd2af0054fe0b140e56f36..4b194d00a3ec882eadef1c32d72eb7449013a39d 100755 (executable)
@@ -17,6 +17,13 @@ import './js/shortcuts/entry';
 /* Theme style */
 import './css/index.scss';
 
+const stickyNav = () => {
+  const nav = $('.js-entry-nav-top');
+  $('[data-toggle="actions"]').click(() => {
+    nav.toggleClass('entry-nav-top--sticky');
+  });
+};
+
 $(document).ready(() => {
   // sideNav
   $('.button-collapse').sideNav();
@@ -36,6 +43,7 @@ $(document).ready(() => {
   initFilters();
   initExport();
   initRandom();
+  stickyNav();
 
   const toggleNav = (toShow, toFocus) => {
     $('.nav-panel-actions').hide(100);