From: Vincent Vanwaelscappel Date: Thu, 18 Nov 2021 08:29:27 +0000 (+0100) Subject: wait #4887 @0.25 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=11204b5b196b398d8e801ea8d59d9430f098d4d5;p=fluidbook-html5.git wait #4887 @0.25 --- diff --git a/js/libs/fluidbook/fluidbook.menu.js b/js/libs/fluidbook/fluidbook.menu.js index 8465a117..02953bf5 100644 --- a/js/libs/fluidbook/fluidbook.menu.js +++ b/js/libs/fluidbook/fluidbook.menu.js @@ -214,9 +214,9 @@ FluidbookMenu.prototype = { var view = this.getCaption('', $(a).attr('data-popup-close') === null || $(a).attr('data-popup-close') === undefined || $(a).attr('data-popup-close') === '1'); var links = ''; var animateLinks = false; - var uid = $(a).closest('[data-id]').data('id'); - if (this.fluidbook.settings.links['link_' + uid] !== undefined) { - links = ''; + var md5 = $(a).closest('[data-md5]').data('md5'); + if (this.fluidbook.settings.links['link_' + md5] !== undefined) { + links = ''; animateLinks = true; } view += '
'; @@ -243,7 +243,7 @@ FluidbookMenu.prototype = { this._openiframe(markup, '', callback); }, - _openiframe: function (markup, maxWidth, callback,hash) { + _openiframe: function (markup, maxWidth, callback, hash) { var $this = this; @@ -252,7 +252,7 @@ FluidbookMenu.prototype = { view += markup; view += '
'; - this.viewWrap(view, 'iframe', maxWidth + ' dir="ltr"','',false,hash); + this.viewWrap(view, 'iframe', maxWidth + ' dir="ltr"', '', false, hash); if (callback != undefined) { callback(); } @@ -272,7 +272,7 @@ FluidbookMenu.prototype = { }, openIframe: function (iframe, callback) { - var hash='#/iframe/' + iframe; + var hash = '#/iframe/' + iframe; var href = hash; var a = $('a[href="' + href + '"]'); if ($(a).length === 0) { @@ -284,7 +284,7 @@ FluidbookMenu.prototype = { if ($(a).data('max-width')) { maxWidth = ' data-max-width="' + $(a).data('max-width') + '"'; } - this._openiframe(markup, maxWidth, callback,hash); + this._openiframe(markup, maxWidth, callback, hash); }, openVideo: function (video, callback) { @@ -415,7 +415,7 @@ FluidbookMenu.prototype = { }); view += ''; view += '
'; - this.viewWrap(view, 'locales',[],'',false,'#/locales'); + this.viewWrap(view, 'locales', [], '', false, '#/locales'); if (callback != undefined) { callback(); } @@ -1097,7 +1097,7 @@ FluidbookMenu.prototype = { hideOverlay: function () { $("#viewOverlay").css('opacity', 0); - this.viewOverlayHideTimeout=setTimeout(function () { + this.viewOverlayHideTimeout = setTimeout(function () { $("#viewOverlay").hide(); }, 400); }, diff --git a/js/main.js b/js/main.js index f998c428..3ab0c122 100644 --- a/js/main.js +++ b/js/main.js @@ -255,11 +255,11 @@ try { } INITED = true; - console.log('init fluidbook '+window.location); + console.log('init fluidbook ' + window.location); try { window.fluidbook = new Fluidbook(SETTINGS); - }catch (e) { - console.error('error while loading the fluidbook '+e.message); + } catch (e) { + console.error('error while loading the fluidbook ' + e.message); } if (null != gal) { fluidbook.gal = gal; @@ -558,4 +558,4 @@ $(function () { } return false; } -}) +});