"lang",
];
- // Note: no longer necessary to hide icons this way because their event handlers are set in initEventHandlers()
- // var hide = array_diff(all, this.fluidbook.datas.navOrder); // Array of icons that aren't in the navOrder list and should be hidden
- // var loop = [].concat(this.fluidbook.datas.navOrder).concat(hide);
-
// Fallback to default list if navOrder is still empty for some reason
if (navOrder.length == 0) {
navOrder = all;
}
- if (!this.fluidbook.datas.displayChaptersIcon) {
- hide.push('chapters');
- }
-
// If the locales icon is included, it should always be placed last in the list for formatting reasons
var localeIconIndex;
if ((localeIconIndex = navOrder.indexOf('lang')) !== -1) {
} else if (icon == 'index') {
link = this.addLink(navType, 'nav-index', '#/index', 'index', 'overview', 'overview');
} else if (icon == 'chapters') {
- if (this.fluidbook.datas.displayChaptersIcon) {
- if (this.fluidbook.datas.chaptersPage != '') {
- link = this.addLink(navType, 'nav-chapters', '#/page/' + this.fluidbook.datas.chaptersPage, 'chapters', 'chapters', 'chapters');
- } else if (this.fluidbook.datas.chapters.length > 0) {
+ if (!this.fluidbook.datas.displayChaptersIcon) {
+ continue;
+ }
+ if (this.fluidbook.datas.chaptersPage != '') {
+ link = this.addLink(navType, 'nav-chapters', '#/page/' + this.fluidbook.datas.chaptersPage, 'chapters', 'chapters', 'chapters');
+ } else if (this.fluidbook.datas.chapters.length > 0) {
- // NOTE: Currently the MMenu breaks when the non-cascading chapter UL HTML is inserted so it will
- // be opened in a popup for now. Todo: fix this so it works as a sub panel of it's own
- if (navType == 'menu' && this.fluidbook.datas.chaptersCascade && !this.fluidbook.datas.displayChaptersPopup) {
- link = this.addLink(navType, 'nav-chapters', '', 'chapters', 'chapters', 'chapters');
+ // NOTE: Currently the MMenu breaks when the non-cascading chapter UL HTML is inserted so it will
+ // be opened in a popup for now. Todo: fix this so it works as a sub panel of it's own
+ if (navType == 'menu' && this.fluidbook.datas.chaptersCascade && !this.fluidbook.datas.displayChaptersPopup) {
+ link = this.addLink(navType, 'nav-chapters', '', 'chapters', 'chapters', 'chapters');
- // Get HTML for submenus (appended later)
- this.chaptersMenuHTML = this.makeChapterLists(this.fluidbook.datas.chapters);
+ // Get HTML for submenus (appended later)
+ this.chaptersMenuHTML = this.makeChapterLists(this.fluidbook.datas.chapters);
- } else {
- link = this.addLink(navType, 'nav-chapters', '#/chapters', 'chapters', 'chapters', 'chapters');
- }
+ } else {
+ link = this.addLink(navType, 'nav-chapters', '#/chapters', 'chapters', 'chapters', 'chapters');
}
}
-
// Sharing icons - this may contain many different icons
} else if (icon == 'friend') {
if (this.fluidbook.share.isEnabled()) {
return html;
},
- burgerActive:function(){
+ burgerActive: function () {
return $('#menuOpener').is(':visible');
}
};