]> _ Git - fluidbook-html5.git/commitdiff
wait #7716 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 9 Sep 2025 16:52:39 +0000 (18:52 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 9 Sep 2025 16:52:39 +0000 (18:52 +0200)
js/libs/fluidbook/fluidbook.burger.js
js/libs/fluidbook/fluidbook.elasticslide.js
js/libs/fluidbook/fluidbook.search.js
style/elasticslide.less

index 2119ffaaf8f742550c697d9335d9f78f15df19a9..7672f81a6883038bb290e629a46f704af73f1537 100644 (file)
@@ -14,7 +14,7 @@ FluidbookBurger.prototype = {
         var a = credits.find('a');
         var t = a.text();
         credits.find('a').text(t);
-        let li=$('<li></li>');
+        let li = $('<li></li>');
         li.append(credits);
         $("#menuList > ul").append(li);
 
@@ -239,11 +239,15 @@ FluidbookBurger.prototype = {
     },
 
     hideMenuItems: function () {
-        gsap.to($('#menuList >ul > li, #shareLinks,footer#mobile-credits'), {duration: 0.1, opacity: 0, display: 'none'});
+        gsap.to($('#menuList >ul > li, #shareLinks,footer#mobile-credits'), {
+            duration: 0.1, opacity: 0, display: 'none'
+        });
     },
 
     showMenuItems: function () {
-        gsap.to($('#menuList >ul> li, #shareLinks,footer#mobile-credits'), {duration: 0.3, opacity: 1, display: 'block'});
+        gsap.to($('#menuList >ul> li, #shareLinks,footer#mobile-credits'), {
+            duration: 0.3, opacity: 1, display: 'block'
+        });
     },
 
     openSearch: function (q, cb) {
@@ -331,8 +335,7 @@ FluidbookBurger.prototype = {
 
         //$("#q").keyup(searchHints);
         $(document).on('keyup', '#q', function (key) {
-            console.log(key);
-            if(key.ctrlKey){
+            if (key.ctrlKey) {
                 return;
             }
             switch (key.which) {
index f204bf93d271f37a1e361d29bb3352eff99bf3c3..8989e36560f4ef324c0b3fb414575f2f60226b5d 100644 (file)
@@ -146,6 +146,7 @@ FluidbookElasticSlide.prototype = {
         } else {
             this.fluidbook.currentPage = page;
         }
+
         let $this = this;
         $("#elasticpages .scrollholder .page.current:not(#epage_" + page + ")").removeClass('current');
         $("#epage_" + page).addClass('current');
@@ -156,6 +157,7 @@ FluidbookElasticSlide.prototype = {
             })
         });
         this.fluidbook.links.initLinks(page);
+        $(this.fluidbook).trigger('fluidbook.page.change.end', [this.fluidbook.currentPage]);
     },
 
     startHelpTimeout: function () {
index f83ca257094964e369161a5a022a03b49bc014c6..9fb8b400ecbe96b0f891ee4a741aed713b212bec 100644 (file)
@@ -21,6 +21,7 @@ FluidbookSearch.prototype = {
     init: function () {
         var $this = this;
         $(this.fluidbook).on('fluidbook.page.change.end', function (e, pageNr) {
+            console.log(':)');
             $this.highlightSearchTerms(pageNr);
         });
         $(document).on('change', '#q', function () {
@@ -566,7 +567,6 @@ FluidbookSearch.prototype = {
     setRobustHighlightTerms: function (terms) {
         let term = terms.join('');
         term = this.removeSpaceAndPoints(term);
-        console.log(term);
         let letters = term.split('');
 
         let occurences = [];
@@ -769,7 +769,6 @@ FluidbookSearch.prototype = {
         } else {
             try {
                 if ($("#q").val().length == 0) {
-                    console.log(':)');
                     this.hideSearchHints();
                     this.fluidbook.nav.burger.showMenuItems(); // Show main menu items that were hidden previously
                 }
index 146d1a5a7468250e121a085647f2d6cb9923048d..da9e1883497f66fb7714a53aae991fd5c4dae5f0 100644 (file)
       overflow-y: hidden;
     }
 
+    .searchResultsNavActive &{
+      overflow-y: hidden;
+    }
+
     &::-webkit-scrollbar {
       display: none;
     }