mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 13:32:24 +00:00
hooking up in-page navigation menu
This commit is contained in:
1 parent
ea27259ae9
commit
fd251de507
2 files changed
+10
-5
No files matched your search
@@ -36,10 +36,15 @@ THE SOFTWARE.
|
||||
</style>
|
||||
<script>
|
||||
window.addEventListener("load",function(){
|
||||
breadcrumbs.attachMenu('inpage-nav',
|
||||
new breadcrumbs.ContextMenu().add(
|
||||
'/',
|
||||
'${rootURL}${h.resourcePath}/images/24x24/gear.png',"hello world"))
|
||||
/** @type section.SectionNode */
|
||||
var outline = section.buildTree();
|
||||
var menu = new breadcrumbs.ContextMenu();
|
||||
$A(outline.children).each(function (e) {
|
||||
if (!e.section.id)
|
||||
e.section.setAttribute("id","section"+(iota++));
|
||||
menu.add('#'+e.section.id,null,e.getHTML());
|
||||
});
|
||||
breadcrumbs.attachMenu('inpage-nav',menu);
|
||||
});
|
||||
</script>
|
||||
<div class="behavior-loading">${%LOADING}</div>
|
||||
|
||||
@@ -35,7 +35,7 @@ var section = (function (){
|
||||
* For root node, the 'section' property refers to null.
|
||||
*/
|
||||
"buildTree" : function(root) {
|
||||
root = $(root);
|
||||
root = $(root||document.body);
|
||||
|
||||
/**
|
||||
* Recursively visit elements and find all section headers.
|
||||
|
||||
Reference in new issue
Block a user