mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 09:05:56 +00:00
Move the nested submenu to a separate block using JavaScript
This commit is contained in:
parent
7e7b67548e
commit
581062b412
@ -50,7 +50,19 @@
|
||||
$("#table-of-contents li a").click(function (e) { e.stopPropagation(); });
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** -----------------------------------------------
|
||||
* SUBMENU
|
||||
*
|
||||
* move to separate menu block
|
||||
*/
|
||||
if ($("#submenu").length > 0) {
|
||||
var submenu = '<div class = "sidebar-box"><ul>';
|
||||
submenu += $("#submenu").html();
|
||||
$("#sidebar-column").append(submenu);
|
||||
$("#submenu").remove();
|
||||
}
|
||||
|
||||
/** ---------------------------------------------
|
||||
* HEADING ANCHOR LINKS
|
||||
*
|
||||
|
@ -6,7 +6,7 @@
|
||||
<li>
|
||||
<a href="$Link" class="$LinkingMode">$Title</a>
|
||||
<% if Children %>
|
||||
<ul>
|
||||
<ul id="submenu">
|
||||
<% control Children %>
|
||||
<li><a href="$Link" class="$LinkingMode">
|
||||
$Title <% if IsFolder %><span class="is-folder">►</span><% end_if %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user