} else if (icon === 'basket' && this.fluidbook.cart !== undefined && this.fluidbook.cart.enabled) {
// __('basket')
link = this.addLink(navType, this.fluidbook.settings.cartIcon, '#/cart', 'cart', 'basket', 'basket', 'Control+Alt+C');
- $(this.fluidbook).on('fluidbook.cart.updateIcon', {link:link},function (e, data) {
+ $(this.fluidbook).on('fluidbook.cart.updateIcon', {link: link}, function (e, data) {
var n = data.number;
- var l = $("#" +$(e.data.link).attr('id'));
+ var l = $("#" + $(e.data.link).attr('id'));
if (n === 0) {
$(l).find('span.number').remove();
// Process link ID from editor
if (extraURL.indexOf('link:') === 0) {
var linkId = extraURL.split(':', 2)[1];
- var foundLink='';
+ var foundLink = '';
$.each(this.fluidbook.settings.links, function (page, plinks) {
var allLinks = '';
$.each(plinks, function (blendmode, links) {
}
});
- if(foundLink===''){
+ if (foundLink === '') {
console.log('link not found');
continue;
}
}
-
if (!visible) {
$(link).addClass('hidden');
if (link2) {
// and return the user to the main menu instead of closing the menu
if ($this.fluidbook.search.isSearchActive()) {
$this.fluidbook.search.closeSearch();
+ if (!$("#horizontalNav").is(':visible')) {
+ $this.menuAPI.close();
+
+ }
} else {
// If we're closing the menu but the search was open and nothing
// was searched for, we need to reset the menu...