From: Vincent Vanwaelscappel Date: Wed, 12 Jan 2022 11:02:13 +0000 (+0100) Subject: wait #5015 @0:10 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6f4c5cc5c01cc11b2a05366f8325036e61aae702;p=fluidbook-html5.git wait #5015 @0:10 --- diff --git a/js/libs/fluidbook/fluidbook.tabs.js b/js/libs/fluidbook/fluidbook.tabs.js index 8d8d358d..1a190bb9 100644 --- a/js/libs/fluidbook/fluidbook.tabs.js +++ b/js/libs/fluidbook/fluidbook.tabs.js @@ -97,6 +97,7 @@ FluidbookTabs.prototype = { this.hideEdge = this.fluidbook.settings.tabsHideEdges; this.linkWidth = parseFloat(this.fluidbook.settings.tabsLinkWidth); this.priority = parseFloat(this.fluidbook.settings.tabsPriority) / 100; + this.disabledOnPages=this.fluidbook.settings.tabsDisabledOnPages; this.sections = this.fluidbook.settings.tabsSections.map(function (x) { return parseInt(x); @@ -195,19 +196,23 @@ FluidbookTabs.prototype = { changePage: function (page) { var id = 'oo'; var $this = this; - $.each(this.links, function (k, v) { - if (page >= v.page) { - try { - if (v.last !== undefined && page >= v.last) { - id = 'none'; - } else { - id = v.id; - } - } catch (e) { + if(this.disabledOnPages.indexOf(page)>=0){ + id='none'; + }else { + $.each(this.links, function (k, v) { + if (page >= v.page) { + try { + if (v.last !== undefined && page >= v.last) { + id = 'none'; + } else { + id = v.id; + } + } catch (e) { + } } - } - }); + }); + } if (id === 'none') { this.svg.find('[id^="o"].active').removeClass('active');