From 244cc666ac188ff7228ce4225a76fb918905d975 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 16 Feb 2022 11:32:37 +0100 Subject: [PATCH] wait #5101 @0.75 --- js/libs/fluidbook/fluidbook.js | 1 + js/libs/fluidbook/fluidbook.menu.js | 13 +++++++++++-- style/fluidbook.less | 4 ++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index 4456511e..002e2653 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -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]); diff --git a/js/libs/fluidbook/fluidbook.menu.js b/js/libs/fluidbook/fluidbook.menu.js index ea369503..05b62c23 100644 --- a/js/libs/fluidbook/fluidbook.menu.js +++ b/js/libs/fluidbook/fluidbook.menu.js @@ -341,7 +341,9 @@ FluidbookMenu.prototype = { c = ' ' + c; } return '' + getSpriteIcon('interface-close') + ''; - }, 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(); }, diff --git a/style/fluidbook.less b/style/fluidbook.less index 43e7bc63..343c3290 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -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; -- 2.39.5