From: Vincent Vanwaelscappel Date: Thu, 6 Jul 2017 12:18:25 +0000 (+0200) Subject: done #1545 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e85d485b9ce2fbcfa0f44f58a1940ece4d4aa370;p=fluidbook-html5.git done #1545 @0.5 --- 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 += '
  • ';