// All possible icons and default ordering
- var all = "index,chapters,search,friend,print,bookmark,archives,basket,fullscreen,sound,3d,help,lang".split(",");
+ var all = "extra,index,chapters,search,friend,print,bookmark,archives,basket,fullscreen,sound,3d,help,lang".split(",");
// 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);
var loop = this.fluidbook.datas.navOrder;
var localeIconIndex;
// If the locales icon is included, it should always be placed last in the list for formatting reasons
- if ((localeIconIndex = loop.indexOf('lang')) !== -1) {
- loop.push(loop.splice(localeIconIndex, 1)[0]); // Push to end of array
- }
+ // if ((localeIconIndex = loop.indexOf('lang')) !== -1) {
+ // loop.push(loop.splice(localeIconIndex, 1)[0]); // Push to end of array
+ // }
for (var e in loop) {
var icon = loop[e];
link = this.addLink(navType, 'interface-search', '#', 'searchIcon', 'search', 'search');
}
+ } else if (icon == 'extra') {
+
+ if (this.fluidbook.datas.navExtraImage == '' || this.fluidbook.datas.navExtraLink == '') {
+ continue;
+ }
+
+ var id = 'extra',
+ $nav = this.getNavFromType(navType),
+ elementID = navType + '_' + id,
+ navExtraImage;
+
+ if ($nav.find('#' + elementID).length > 0) {
+ continue;
+ }
+
+ if (navType == 'horizontalNav') {
+ navExtraImage = this.fluidbook.datas.navExtraImage;
+ } else if (navType == 'menu') {
+ navExtraImage = this.fluidbook.datas.navExtraImageMobile || this.fluidbook.datas.navExtraImage; // Fallback to desktop image
+ }
+
+ link = '<a id="' + elementID + '" href="' + this.fluidbook.datas.navExtraLink + '"><img src="data/images/' + navExtraImage + '"></a>';
+
+ $nav.find('ul').append('<li>' + link + '</li>');
+
+
}
// if (!visible) {