}
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--) {
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++;
this.html[sub] = '<ul class="' + classes.join(' ') + '">';
$.each(base, function (k, v) {
if (!forgetCut) {
- forgetCut = v.label.indexOf('++') === 0;
+ forgetCut = v.decoration === 'nocut' || v.label.indexOf('++') === 0;
if (forgetCut) {
return;
}
}
- forceCut = v.label.indexOf('--') === 0 || v.label.indexOf('!!!') === 0;
- ignore = forceCut || v.label.indexOf('++') === 0;
+ forceCut = v.decoration === 'forcecut' || v.decoration === 'column_head' || v.decoration === 'separator' || v.label.indexOf('--') === 0 || v.label.indexOf('!!!') === 0;
+ ignore = forceCut || v.decoration === 'nocut' || v.label.indexOf('++') === 0;
// Next column
if (!forgetCut && ((columnId + 1) < columns && ((columns > 1 && v.level === 0 && i > (perCol * 0.8)) || (forceCut && i > 0)))) {
this.html[sub] += '<div class="column">' + columnsContainers[j].join('') + '</div>';
}
this.html[sub] += '</ul>';
- },
- addItem: function (chapter, baseLevel) {
+ }, addItem: function (chapter, baseLevel) {
if (baseLevel == undefined) {
baseLevel = 0;
}
- if (chapter.label == '----') {
+ if (chapter.decoration === 'separator' || chapter.label === '----') {
return '<li class="separator"></li>';
}
var color = chapter.color;
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';
}