]> _ Git - fluidbook-html5.git/commitdiff
#7461 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 9 May 2025 16:28:34 +0000 (18:28 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 9 May 2025 16:28:34 +0000 (18:28 +0200)
js/libs/fluidbook/fluidbook.burger.js
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.nav.js
js/libs/fluidbook/fluidbook.search.js
js/main.js

index 18de4036cdcac3e75eca472072be17660be4ce0b..251e77c71847ed7d44841caf80594de117e72f99 100644 (file)
@@ -215,6 +215,14 @@ FluidbookBurger.prototype = {
         return this.open();
     },
 
+    hideMenuItems: function () {
+        gsap.to($('#menuList > li, #shareLinks,footer#mobile-credits'), {duration: 0.1, autoAlpha: 0});
+    },
+
+    showMenuItems: function () {
+        gsap.to($('#menuList > li, #shareLinks,footer#mobile-credits'), {duration: 0.3, autoAlpha: 1});
+    },
+
     openSearch: function (q, cb) {
         if (!this.fluidbook.search.isSearchActive()) {
             if (!this.fluidbook.settings.searchFullBurger) {
@@ -223,7 +231,6 @@ FluidbookBurger.prototype = {
             }
         }
 
-
         if (q !== undefined) {
             $("#q").val(q);
             if ($("#menuSearchResults .content").length === 0) {
index 409a9158f0fcfeafa2d25be6bae314af1a8b5c20..c1a1b624d7e71265ca013e2aa2822c0743b7d4fd 100644 (file)
@@ -833,14 +833,6 @@ Fluidbook.prototype = {
         return i + 1;
     },
 
-    hideMenuItems: function () {
-        gsap.to($('#menuList > ul > li, #shareLinks,footer#mobile-credits'), {duration: 0.1, autoAlpha: 0});
-    },
-
-    showMenuItems: function () {
-        gsap.to($('#menuList > ul > li, #shareLinks,footer#mobile-credits'), {duration: 0.3, autoAlpha: 1});
-    },
-
     print: function (button) {
         return this.openPDF(button, true);
     },
index 4e6d6549b26d7de950d9c13d094b558acae37133..dfcc9fc23298fbacb70ae2d1694d2c692eab623c 100644 (file)
@@ -700,6 +700,10 @@ FluidbookNav.prototype = {
 
     burgerActive: function () {
         return this.burger.isActive();
-    }
+    },
+
+    openSearch: function () {
+        return this.burger.openSearch();
+    },
 };
 
index f8216f0877273af10295efc530581faa89105c09..3c6110ff1a06c7055d0df708b7b2c732a600be08 100644 (file)
@@ -731,18 +731,14 @@ FluidbookSearch.prototype = {
             return;
         }
         this.menuSearchHints = $('#menuSearchHints');
-        this.fluidbook.hideMenuItems(); // Hide menu items to give space for hints div
+        this.fluidbook.nav.burger.hideMenuItems(); // Hide menu items to give space for hints div
 
         this.menuSearchHints.fadeIn(300);
-
-        // if (this.menuSearchHints.hasClass('mm-hidden')) {
-        //     this.nav.menuAPI.openPanel(this.menuSearchHints, false);
-        // }
     },
 
     getSearchHints: function (q) {
         if (!this.hintsEnabled) {
-            this.fluidbook.hideMenuItems();
+            this.fluidbook.nav.burger.hideMenuItems();
             this._loadLib(function () {
 
             });
@@ -827,7 +823,7 @@ FluidbookSearch.prototype = {
 
         this.hideSearchHints();
         this.hideSearchResults();
-        this.fluidbook.showMenuItems(); // Show menu items that were hidden previously
+        this.fluidbook.nav.burger.showMenuItems(); // Show menu items that were hidden previously
     },
 
     submitForm: function () {
index b738c0b97850d0fd2c84b746657ceb4ceb4277ed..7dda1d0d8dbd2db270049f57cf21bdbfc57f32a3 100644 (file)
@@ -490,7 +490,7 @@ function searchHints() {
             if ($("#q").val().length == 0) {
                 fluidbook.search.hideSearchHints();
                 fluidbook.search.hideSearchResults();
-                fluidbook.showMenuItems(); // Show main menu items that were hidden previously
+                fluidbook.nav.burger.showMenuItems(); // Show main menu items that were hidden previously
             }
         } catch (err) {
         }