]> _ Git - fluidbook-html5.git/commitdiff
wip #7779
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 11 Dec 2025 16:19:30 +0000 (17:19 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 11 Dec 2025 16:19:30 +0000 (17:19 +0100)
js/libs/fluidbook/fluidbook.accessibility.js
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.nav.js

index a45bc64428390213c0764d64ce382e21496c8ac2..134e4edee24cbb1aaa675f4536fd7208bc9b0a59 100644 (file)
@@ -45,6 +45,14 @@ FluidbookAccessibility.prototype = {
         }
         return '<section data-page="' + page + '">' + this.fluidbook.settings.accessibleTexts[page] + '</section>';
     },
+
+    openMenu: function (callback) {
+        var t = '<div class="content"></div>';
+        this.fluidbook.menu.viewWrap(t, 'accessibility');
+        if (callback != undefined) {
+            callback();
+        }
+    },
 };
 
 /*! outline.js v1.2.0 - https://github.com/lindsayevans/outline.js/ */
index e9ef906b19a2283f79f815dfe3794c054ca4dad5..ab34ad2373b963a983411b4a5c03ab565d38e4c3 100644 (file)
@@ -135,7 +135,9 @@ FluidbookMenu.prototype = {
             this.openObject3D(param1, cb);
         } else if (view === 'article') {
             this.fluidbook.articles.openArticle(param1, cb);
-        } else {
+        } else if(view==='accessibility'){
+            this.fluidbook.accessibility.openMenu(cb);
+        }else {
             this['open' + camelView](param1, param2, cb);
         }
 
@@ -170,6 +172,7 @@ FluidbookMenu.prototype = {
         this.fluidbook.displayLoader();
     },
 
+
     openingView: function (callback, view) {
         var $this = this;
         this.fluidbook.resize.resizeView();
@@ -624,7 +627,9 @@ FluidbookMenu.prototype = {
             callback();
         }
         this.fluidbook.stats.track(14);
-    }, openExternalChapters: function (callback) {
+    },
+
+    openExternalChapters: function (callback) {
         var view = this.getCaption();
         view += '<div class="content"><div class="multimediaHolder"><div class="multimediaScale">';
         view += '<iframe data-width="' + this.fluidbook.settings.externalChaptersSize.width + '" data-height="' + this.fluidbook.settings.externalChaptersSize.height + '"  width="' + this.fluidbook.settings.externalChaptersSize.width + '" height="' + this.fluidbook.settings.externalChaptersSize.height + '" src="data/chapters/index.html" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" onmousewheel=""></iframe>';
index e08ac8f4c77d9881738c21e9fe24cb0be3dabed9..9f281a5b2a18ef83ccd4e700544808239f262259 100644 (file)
@@ -184,6 +184,7 @@ FluidbookNav.prototype = {
          * __('switch off the sound')
          * __('switch on the sound')
          * __('notes')
+         * __('accessibility')
          */
         var $this = this;
         var navOrder = this.fluidbook.settings.navOrder; // Default desktop order, maybe be overridden later