]> _ Git - fluidbook-html5.git/commitdiff
fix #3791 @0.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Jul 2020 18:25:35 +0000 (20:25 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 16 Jul 2020 18:25:35 +0000 (20:25 +0200)
_index.html
js/libs/fluidbook/fluidbook.bookmarks.js
js/libs/fluidbook/fluidbook.menu.js
js/libs/fluidbook/fluidbook.nav.js

index fc6cb136139491a62020c4fb3364a8def75e8221..be72ec2e1972caa66b1d75ace9d4d5090b55ca40 100644 (file)
 </div>
 <div id="searchHints"></div>
 <div id="viewOverlay" aria-hidden="true"></div>
-<div id="view" aria-hidden="true"></div>
+<div id="view" aria-hidden="true" aria-live="polite"></div>
 <div id="innerView" aria-hidden="true"></div>
 <div id="pagesContents" aria-hidden="true"><!-- $pagesContents --></div>
 <div id="op" aria-hidden="true"></div>
index 9fadbe5e036fd640a56051921a43df5f9fab1d7d..1206d671bddf88f94273d8620707e4d7ff8e7ad9 100644 (file)
@@ -489,7 +489,7 @@ FluidbookBookmarks.prototype = {
                 var dim = this.fluidbook.menu.index.getThumbDimensions(group.page);
 
                 index += '<div class="doubleThumb simple left"' + dim.doublethumb + ' page="' + group.page + '" data-pages="' + pages.join(',') + '">';
-                index += '<div class="thumb left"' + dim.thumb + '><a href="#/page/' + group.page + '">' + this.fluidbook.loader.getThumbImage(group.page) + '</a><span class="number"' + dim.pagenumber + '>' + group.name + '</span>';
+                index += this.fluidbook.menu.index._thumb(group.page, 'left', 100);
                 if (this.fluidbook.bookmarks.enabled) {
                     index += this.fluidbook.bookmarks.getBookmarkForPage(group.page, true, true);
                 }
@@ -510,7 +510,7 @@ FluidbookBookmarks.prototype = {
                 var dim = this.fluidbook.menu.index.getThumbDimensions(p);
 
                 index += '<div class="doubleThumb simple left"' + dim.doublethumb + ' page="' + p + '" data-pages="' + p + '">';
-                index += '<div class="thumb left"' + dim.thumb + '><a href="#/page/' + p + '">' + this.fluidbook.loader.getThumbImage(p) + '</a><span class="number"' + dim.pagenumber + '>' + this.fluidbook.physicalToVirtual(p) + '</span>';
+                index += this.fluidbook.menu.index._thumb(p, 'left', 100);
                 if (this.fluidbook.bookmarks.enabled) {
                     index += this.fluidbook.bookmarks.getBookmarkForPage(p, true, true);
                 }
@@ -521,12 +521,12 @@ FluidbookBookmarks.prototype = {
         index += '</div></div>';
         index += '<div class="fonctions">';
         if (this.fluidbook.settings.friend && this.fluidbook.settings.bookmarkSendEnable) {
-            index += '<a class="send" href="#">' + this.fluidbook.l10n.__('send') + '</a>';
+            index += '<a role="button" aria-label="'+this.fluidbook.l10n.__('send')+'" class="send" href="#">' + this.fluidbook.l10n.__('send') + '</a>';
 
         }
         if (this.fluidbook.settings.print || this.fluidbook.settings.pdf) {
             // ToDo: differentiate between download & print?
-            index += '<a class="download" href="#">' + downloadLabel + '</a>';
+            index += '<a role="button" aria-label="' + downloadLabel + '" class="download" href="#">' + downloadLabel + '</a>';
         }
         index += '</div>';
         index += '</div>';
index 41b587045b35ebf9de8339582d22b428e640428d..87755cfeec67899aca5007d3548b6ae1c1ec0cb8 100644 (file)
@@ -441,17 +441,16 @@ FluidbookMenu.prototype = {
         } catch (e) {
 
         }
-        if (title == undefined) {
+        if (title === undefined) {
             title = '';
         }
-        if (downloadLabel == undefined) {
+        if (downloadLabel === undefined) {
             downloadLabel = '';
         }
 
-        var view = this.fluidbook.bookmarks.getView(title, downloadLabel);
-        this.viewWrap(view, 'bookmarks');
+        this.viewWrap(this.fluidbook.bookmarks.getView(title, downloadLabel), 'bookmarks');
 
-        if (callback != undefined) {
+        if (callback !== undefined) {
             callback();
         }
     },
index f3f847379aee84699afa95c8acb90c6ed59fdfa0..37b659be8de4613bc5261ee49c146b8af443d08f 100644 (file)
@@ -732,7 +732,7 @@ FluidbookNav.prototype = {
 
         // Bookmarks icon
         $(document).on('click', '.icon-bookmarks', function () {
-            if ($(this).data('extra') !== null) {
+            if ($(this).data('extra') !== null && $(this).data('extra') !== undefined) {
                 $this.fluidbook.menu.openView('bookmark', $(this).data('extra'), null, function () {
                 });
                 return false;