]> _ Git - fluidbook-html5.git/commitdiff
wip #7461 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 9 May 2025 15:48:06 +0000 (17:48 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 9 May 2025 15:48:06 +0000 (17:48 +0200)
js/libs/fluidbook/fluidbook.help.js
js/libs/fluidbook/fluidbook.keyboard.js
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.nav.js
js/libs/fluidbook/fluidbook.search.js

index 16cf51f53efbe6867a4158a10a9cc17bc6027fe6..7e89633cfc90e6e516dccbf70a9d930d0da12d48 100644 (file)
@@ -196,9 +196,8 @@ FluidbookHelp.prototype = {
 
         $(document).on(this.fluidbook.input.clickEvent, '.icon-help', function (e) {
             $this.show();
-            if ($this.fluidbook.nav.menuIsOpen) {
-                $this.fluidbook.nav.closeMenu();
-            }
+            $this.fluidbook.nav.burger.close();
+
             e.preventDefault();
         });
 
index b23f24d8800f9ae17f4a065d5195a12f84a450bc..ab2f706a2e0b3398e47adedd92da94b9dc1cf0b6 100644 (file)
@@ -21,9 +21,8 @@ FluidbookKeyboard.prototype = {
                 }, true, true);
             }
             $this.fluidbook.search.closeSearch();
-            if ($this.fluidbook.nav.menuIsOpen) {
-                $this.fluidbook.nav.closeMenu();
-            }
+            $this.fluidbook.nav.burger.close();
+
             if ($this.fluidbook.support.isFullscreen()) {
                 document.exitFullscreen();
             }
index 9293dc003b06d2aaade0486765d409f81dbe6cd0..235f713823a00f523be3df6ec7a25229add9366c 100644 (file)
@@ -487,7 +487,7 @@ FluidbookLinks.prototype = {
             var extra = $(this).data('extra');
 
             // Ensure that mobile menu closes if it is open
-            $this.fluidbook.nav.closeMenu();
+            $this.fluidbook.nav.burger.close();
 
             if (action === 'share') {
                 // Let share class handle this
index 2c52df5ecb9f35bbcc4352b31272c59257bf6c22..9dbbaebd15c7bd441c089376b111c5fe5ff622e4 100644 (file)
@@ -140,7 +140,7 @@ FluidbookMenu.prototype = {
         }
 
         if (closeMenu) {
-            this.fluidbook.nav.closeMenu();
+            this.fluidbook.nav.burger.close();
         }
     },
 
index 0b157a983887bce0e706de99141f12f34837a228..4e6d6549b26d7de950d9c13d094b558acae37133 100644 (file)
@@ -281,7 +281,7 @@ FluidbookNav.prototype = {
                             window.location = $($thislink).attr('href');
                         }, 500);
                     } else {
-                        $this.closeMenu();
+                        $this.burger.close();
                         window.location = $(this).attr('href');
                     }
                     return false;
@@ -300,17 +300,7 @@ FluidbookNav.prototype = {
                 } else if (this.fluidbook.settings.chaptersPage !== '') {
                     link = this.addLink(navType, 'nav-chapters', '#/page/' + this.fluidbook.settings.chaptersPage, 'chapters', 'chapters', 'chapters', 'F2');
                 } else if (this.fluidbook.settings.chapters.length > 0) {
-                    // NOTE: Currently the MMenu breaks when the non-cascading chapter UL HTML is inserted so it will
-                    // be opened in a popup for now. Todo: fix this so it works as a sub panel of it's own
-                    if (navType === 'menu' && this.fluidbook.settings.chaptersCascade && !this.fluidbook.settings.displayChaptersPopup) {
-                        link = this.addLink(navType, 'nav-chapters', '', 'chapters', 'chapters', 'chapters', 'F2');
-
-                        // Get HTML for submenus (appended later)
-                        this.chaptersMenuHTML = this.makeChapterLists(this.fluidbook.settings.chapters);
-
-                    } else {
-                        link = this.addLink(navType, 'nav-chapters', '#/chapters', 'chapters', 'chapters', 'chapters', 'F2');
-                    }
+                    link = this.addLink(navType, 'nav-chapters', '#/chapters', 'chapters', 'chapters', 'chapters', 'F2');
                 }
                 // Sharing icons - this may contain many different icons
             } else if (icon === 'friend') {
@@ -640,7 +630,7 @@ FluidbookNav.prototype = {
 
         // Full screen toggle
         $(document).on(this.fluidbook.input.clickEvent, '.icon-fullscreen', function () {
-            $this.closeMenu();
+            $this.burger.close();
             $this.fluidbook.support.toggleFullscreen();
             return false;
         });
index 160ba963b45bd283fe0ab0e311ac1ee155a32239..f8216f0877273af10295efc530581faa89105c09 100644 (file)
@@ -961,7 +961,7 @@ FluidbookSearch.prototype = {
         if (gotoPageIfOneResult && spreadEnabled === 1) {
             setTimeout(function () {
                 fluidbook.setCurrentPage($this.menuSearchResults.find('.doubleThumb[data-enabled="1"]').attr('page'));
-                fluidbook.nav.closeMenu();
+                fluidbook.nav.burger.close();
             }, 100);
             return;
         }