From: Vincent Vanwaelscappel Date: Wed, 26 Jan 2022 14:01:08 +0000 (+0100) Subject: wait #5057 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=e6cbc93c9a2842e6aa21c0490bd36617557c2c63;p=fluidbook-html5.git wait #5057 @0.5 --- diff --git a/js/libs/fluidbook/fluidbook.nav.js b/js/libs/fluidbook/fluidbook.nav.js index 7c9d672e..0ac66d16 100644 --- a/js/libs/fluidbook/fluidbook.nav.js +++ b/js/libs/fluidbook/fluidbook.nav.js @@ -469,9 +469,9 @@ FluidbookNav.prototype = { } 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(); @@ -606,7 +606,7 @@ FluidbookNav.prototype = { // 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) { @@ -619,7 +619,7 @@ FluidbookNav.prototype = { } }); - if(foundLink===''){ + if (foundLink === '') { console.log('link not found'); continue; } @@ -642,7 +642,6 @@ FluidbookNav.prototype = { } - if (!visible) { $(link).addClass('hidden'); if (link2) { @@ -852,6 +851,10 @@ FluidbookNav.prototype = { // 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...