From e85d485b9ce2fbcfa0f44f58a1940ece4d4aa370 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 6 Jul 2017 14:18:25 +0200 Subject: [PATCH] done #1545 @0.5 --- js/libs/fluidbook/menu/fluidbook.chapters.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/js/libs/fluidbook/menu/fluidbook.chapters.js b/js/libs/fluidbook/menu/fluidbook.chapters.js index f470cafc..3569640a 100644 --- a/js/libs/fluidbook/menu/fluidbook.chapters.js +++ b/js/libs/fluidbook/menu/fluidbook.chapters.js @@ -2,6 +2,7 @@ function FluidbookChapters(fluidbook, chapters) { this.fluidbook = fluidbook; this.chapters = chapters; this.style = 'classic'; + this.cascade = this.fluidbook.datas.chaptersCascade; if (this.fluidbook.datas.mobileChaptersStyle) { this.style = this.fluidbook.datas.mobileChaptersStyle; } @@ -18,7 +19,7 @@ FluidbookChapters.prototype = { }, makeView: function () { this.makeClassicMenu(); - if (this.fluidbook.datas.chaptersCascade) { + if (this.cascade) { this.makeCascadeMenu(); } }, @@ -96,12 +97,12 @@ FluidbookChapters.prototype = { if (chapter.page != '') { var p = this.fluidbook.virtualToPhysical(chapter.page); if (p === false) { - href = "nohref"; + href = this.cascade ? 'href="#"' : "nohref"; } else { href = 'href="#/page/' + p + '"'; } } else { - href = "nohref"; + href = this.cascade ? 'href="#"' : "nohref"; } if (this.style == 'classic') { res += '
  • '; -- 2.39.5