From 25ac5cac8bccf73719240061f44f127e14c882b0 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 25 Aug 2022 11:35:58 +0200 Subject: [PATCH] wip #5416 @0.25 --- js/libs/fluidbook/menu/fluidbook.chapters.js | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/js/libs/fluidbook/menu/fluidbook.chapters.js b/js/libs/fluidbook/menu/fluidbook.chapters.js index dc17097a..32b17614 100644 --- a/js/libs/fluidbook/menu/fluidbook.chapters.js +++ b/js/libs/fluidbook/menu/fluidbook.chapters.js @@ -24,14 +24,12 @@ FluidbookChapters.prototype = { } return {sub: sub, view: this.html[sub], title: this.titles[sub], color: this.colors[sub]}; - }, - makeView: function (sub) { + }, makeView: function (sub) { this.makeClassicMenu(sub); if (this.cascade) { this.makeCascadeMenu(sub); } - }, - makeCascadeMenu: function (sub) { + }, makeCascadeMenu: function (sub) { var h = $(this.html[sub]); for (var i = 3; i >= 0; i--) { @@ -112,7 +110,10 @@ FluidbookChapters.prototype = { var vu = false; var level; $.each(this.chapters, function (k, v) { - if (v.label === '--' || v.label === '++') { + if (v.decoration === undefined) { + v.decoration = ''; + } + if (v.decoration === 'nocut' || v.decoration === 'forcecut' || v.label === '--' || v.label === '++') { } else { nbItems++; @@ -146,13 +147,13 @@ FluidbookChapters.prototype = { this.html[sub] = ''; - }, - addItem: function (chapter, baseLevel) { + }, addItem: function (chapter, baseLevel) { if (baseLevel == undefined) { baseLevel = 0; } - if (chapter.label == '----') { + if (chapter.decoration === 'separator' || chapter.label === '----') { return '
  • '; } var color = chapter.color; @@ -193,8 +193,8 @@ FluidbookChapters.prototype = { this.lastColor = color; } - if (chapter.label.substr(0, 3) == '!!!') { - chapter.label = chapter.label.substring(3); + if (chapter.decoration === 'column_head' || chapter.label.substr(0, 3) == '!!!') { + chapter.label = chapter.decoration === 'column_head' ? chapter.label : chapter.label.substring(3); chapter.level = '-1'; } -- 2.39.5