From 8dcc44e16ca20e135213b66a23ee243d64b10420 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 8 Jun 2017 16:09:45 +0200 Subject: [PATCH] fix #1446 @0.75 --- js/libs/fluidbook/fluidbook.js | 27 ++++++++++++++++++++++++--- style/fluidbook.less | 4 ++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index 4b75547e..5baf47d4 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -20,6 +20,7 @@ Fluidbook.RIGHT = 6; Fluidbook.MIDDLE = 7; Fluidbook.TOP = 8; Fluidbook.BOTTOM = 9; + Fluidbook.prototype = { init: function (datas) { this.datas = datas; @@ -129,7 +130,7 @@ Fluidbook.prototype = { }, _hideSplash: function () { this.ready(); - $("#main").css('visibility', 'visible'); + $("#main,#viewOverlay,#view").css('visibility', 'visible'); this.hideLoader(0, true); if (this.support.transitions2d) { @@ -285,7 +286,7 @@ Fluidbook.prototype = { var $this = this; var page; var args = window.location.hash.split('/'); - + if (args.length <= 1 || args[1] == '' || args[1] == undefined) { return this.setCurrentPage('1'); } else if (args[1] == 'closeview') { @@ -318,7 +319,27 @@ Fluidbook.prototype = { }, true); } else { - this.menu.openView(args[1], args[2], args[3], function () { + var view = args[1]; + if (this.currentPage == -1) { + if (view == 'multimedia' || view == 'video') { + var $this = this; + var searchURL = args.join('/'); + $.each(this.datas.links, function (pageNr, links) { + var hl = $('' + links + ''); + if ($(hl).find('[href="' + searchURL + '"]').length > 0) { + $this.currentPage = pageNr; + return false; + } + }); + if (this.currentPage == -1) { + this.currentPage = 0; + } + } else { + this.currentPage = 0; + } + $this.pageTransition(this.currentPage); + } + this.menu.openView(view, args[2], args[3], function () { $this.hideSplash(); }); this.zoom.resetZoom(); diff --git a/style/fluidbook.less b/style/fluidbook.less index 107bbd2f..6dc6900f 100644 --- a/style/fluidbook.less +++ b/style/fluidbook.less @@ -837,6 +837,10 @@ footer.hidden, header.hidden, #interface.hidden { .overlayBackground(); } +#view, #viewOverlay { + visibility: hidden; +} + .mview { background-color: @menu-background; color: @menu-text; -- 2.39.5