From: Stephen Cameron Date: Mon, 19 Jun 2017 16:31:49 +0000 (+0200) Subject: Handle cascading and non-cascading chapter views in the menu. Remove links from paren... X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=54d1b0afb9c57c52fed9ab6f57c86e0fcfd0b4c7;p=fluidbook-html5.git Handle cascading and non-cascading chapter views in the menu. Remove links from parent items when in cascade mode. Debug problems with MMenu v6.x. WIP #807 @3 --- diff --git a/js/libs/fluidbook/fluidbook.nav.js b/js/libs/fluidbook/fluidbook.nav.js index 2c448c7d..1f67d803 100644 --- a/js/libs/fluidbook/fluidbook.nav.js +++ b/js/libs/fluidbook/fluidbook.nav.js @@ -279,11 +279,39 @@ FluidbookNav.prototype = { } this.setInterface(); + // Insert Chapters submenus if (this.chaptersMenuHTML != '') { $('#chapters').parent().append(this.chaptersMenuHTML); } + + // Remove unwanted links from chapters menu + // For any items that have a submenu, we want to remove the page link + // from the parent item to make it easier to open the submenu + $('#chapterList li a').each(function() { // Process all links in the chapters submenu + if ($(this).siblings('ul').length > 0) { // Check if any have a