From 23aa3063bd29a03ff82f41b73e30a6676e466fef Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 17 Nov 2022 15:18:20 +0100 Subject: [PATCH] wait #5578 @0.75 --- js/libs/fluidbook/fluidbook.links.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index 46690742..87f4baa8 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -30,7 +30,6 @@ FluidbookLinks.prototype = { this.jumpToPageContainingLink = true; var $this = this; - if (this.fluidbook.settings.phonegap === 'ios') { $(document).on('touchstart touchend click', 'a.clickonly', function (e) { var cancel = function (e) { @@ -66,7 +65,6 @@ FluidbookLinks.prototype = { this.lowdef = this.fluidbook.support.android || this.fluidbook.support.iOS; - $(this.fluidbook).on('fluidbook.page.change.end', function () { if ($this.lastTriggeredLinksPage == $this.fluidbook.currentPage) { return; @@ -91,7 +89,6 @@ FluidbookLinks.prototype = { }); }); - $(document).on(this.fluidbook.input.clickEvent, '[data-id] a', function () { var id = $(this).closest('[data-id]').attr('data-id'); $this.fluidbook.contentlock.addAction(id, 'click'); @@ -283,6 +280,13 @@ FluidbookLinks.prototype = { if (mode === 'exclusiveshow' || mode === 'shownext' || mode === 'shownextcycle' || mode === 'showprev' || mode === 'showprevcycle' || mode === 'pickrandom') { var selector = 'div.link[data-hidden="1"].show'; + var hide = []; + // Only hide links that are in the list + if ($(this).is('[data-showid]')) { + hide = $(this).data('showid').split(','); + } else { + hide = 'all'; + } $.each(showid, function (k, id) { selector += ':not([data-id$="' + id + '"])'; }); @@ -291,7 +295,10 @@ FluidbookLinks.prototype = { if ($(selector).is('[data-animation-hide]')) { timeout = 0; } - $this.hidePlacedLink(this, timeout); + var id = $(this).data('id'); + if (hide === 'all' || hide.indexOf(id) >= 0) { + $this.hidePlacedLink(this, timeout); + } }); } -- 2.39.5