]> _ Git - fluidbook-html5.git/commitdiff
wait #5101 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Feb 2022 10:32:37 +0000 (11:32 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 16 Feb 2022 10:32:37 +0000 (11:32 +0100)
js/libs/fluidbook/fluidbook.js
js/libs/fluidbook/fluidbook.menu.js
style/fluidbook.less

index 4456511e3e7b8758956f13974568959d64a2436d..002e26531e28c09864cb5a6196e1b6c0db030b75 100644 (file)
@@ -428,6 +428,7 @@ Fluidbook.prototype = {
         $(this).trigger('fluidbook.hashchange', [args.slice()]);
 
         if (args[1] === 'closeview') {
+            console.log('closeview');
             return this.setCurrentPage(this.currentPage);
         } else if (args[1] === 'page') {
             var anchor = this.normalizeAnchor(args[2]);
index ea369503ce7f863688ec3bb1ca337e667fa58d2d..05b62c23f35c37655d019b7a4b5dbcda7f4f3b91 100644 (file)
@@ -341,7 +341,9 @@ FluidbookMenu.prototype = {
             c = ' ' + c;
         }
         return '<a href="#/closeview" role="button" aria-label="' + this.fluidbook.l10n.__('close') + '" aria-keyshortcuts="Escape" class="button back' + c + '">' + getSpriteIcon('interface-close') + '</a>';
-    }, openAudio: function (audio, callback) {
+    },
+
+    openAudio: function (audio, callback) {
         var hash = '#/audio/' + audio;
         var a = $('a[href="' + hash + '"]');
         var markup = decodeURIComponent($(a).attr('data-audio'));
@@ -585,6 +587,7 @@ FluidbookMenu.prototype = {
             callback = function () {
             };
         }
+
         if (all || $("#view .mview").length <= 1) {
             var currentHash = window.location.hash;
             window.location.hash = '#/page/' + this.fluidbook.currentPage;
@@ -595,6 +598,7 @@ FluidbookMenu.prototype = {
             this._closeView(callback, all, animate);
         }
     }, _closeView: function (callback, all, animate) {
+
         var $this = this;
         if (all == undefined) {
             all = false;
@@ -604,6 +608,7 @@ FluidbookMenu.prototype = {
         }
 
         all = all || ($("#view .mview").length <= 1);
+
         if (!this.viewMode()) {
             this.hideOverlay();
             callback();
@@ -632,7 +637,11 @@ FluidbookMenu.prototype = {
             $("#main").attr('aria-hidden', 'false').show();
             $('body').removeClass('view');
         } else {
-            window.location.hash = $("#view .mview").eq(-2).data('hash');
+            var formerHash = $("#view .mview").eq(-2).data('hash');
+            if (formerHash !== undefined && formerHash !== null) {
+                console.log('goto former hash', formerHash);
+                window.location.hash = formerHash;
+            }
         }
         resize();
     },
index 43e7bc636f8732e16ff015db5fb9dfd583b95200..343c329013bdae49fed13bd4ff24f59be62e05fb 100644 (file)
@@ -1542,6 +1542,10 @@ html.ios body.portrait #interface {
 
   transition: opacity @menutransition, top @menutransition;
 
+  &.fs + .mview {
+    box-shadow: 0 0 10000px 10000px @menu-overlay;
+  }
+
   &[data-menu="index"] {
     .content {
       overflow-x: hidden;