From de3bebd4c7d7b62172bd5ec4cd378a4eecdff0c5 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 27 May 2020 19:02:00 +0200 Subject: [PATCH] wip #3661 @1 --- js/libs/fluidbook/fluidbook.contentlock.js | 1 + js/libs/fluidbook/fluidbook.mobilefirst.js | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.contentlock.js b/js/libs/fluidbook/fluidbook.contentlock.js index a0ffee83..7b805442 100644 --- a/js/libs/fluidbook/fluidbook.contentlock.js +++ b/js/libs/fluidbook/fluidbook.contentlock.js @@ -71,6 +71,7 @@ FluidbookContentLock.prototype = { ); this.fluidbook.hideUnnecessaryButtons(); + this.fluidbook.mobilefirst.refreshFooterNavigation(); resize(); }, diff --git a/js/libs/fluidbook/fluidbook.mobilefirst.js b/js/libs/fluidbook/fluidbook.mobilefirst.js index 26907c12..634781b1 100644 --- a/js/libs/fluidbook/fluidbook.mobilefirst.js +++ b/js/libs/fluidbook/fluidbook.mobilefirst.js @@ -59,7 +59,6 @@ FluidbookMobileFirst.prototype = { var reveal = $(nav).find('.reveal'); var navrect = nav.get(0).getBoundingClientRect(); if (navrect.top < this.fluidbook.resize.hh && reveal.hasClass('toreveal')) { - reveal.removeClass('toreveal'); } }, @@ -126,8 +125,7 @@ FluidbookMobileFirst.prototype = { return; } - $('#pages .mf-nav').remove(); - $("#pages").append(this.getFooterNavigation(page)); + this.refreshFooterNavigation(page); $("#pages .mf-nav").css('opacity', 1); $('#pages .mf-nav .reveal').addClass('toreveal'); @@ -176,6 +174,17 @@ FluidbookMobileFirst.prototype = { return footer; }, + refreshFooterNavigation: function (page) { + if(!this.enabled){ + return; + } + if (page === undefined) { + page = this.fluidbook.currentPage; + } + $('#pages .mf-nav').remove(); + $("#pages").append(this.getFooterNavigation(page)); + }, + resizeIndex: function (repeat) { if (!this.enabled) { return; -- 2.39.5