Docs sidebar in alphanumeric sequence
This commit is contained in:
@@ -190,11 +190,19 @@ function attachModuleSymbols(doclets, modules) {
|
|||||||
*/
|
*/
|
||||||
function buildNav(members) {
|
function buildNav(members) {
|
||||||
var nav = [];
|
var nav = [];
|
||||||
|
// merge namespaces and classes, then sort
|
||||||
if (members.namespaces.length) {
|
var merged = members.namespaces.concat(members.classes);
|
||||||
_.each(members.namespaces, function (v) {
|
merged.sort(function (a, b) {
|
||||||
// exclude 'olx' from sidebar
|
if (a.longname > b.longname)
|
||||||
if (v.longname.indexOf('olx') !== 0) {
|
return 1;
|
||||||
|
if (a.longname < b.longname)
|
||||||
|
return -1;
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
_.each(merged, function (v) {
|
||||||
|
// exclude 'olx' and interfaces from sidebar
|
||||||
|
if (v.longname.indexOf('olx') !== 0 && v.interface !== true) {
|
||||||
|
if (v.kind == 'namespace') {
|
||||||
nav.push({
|
nav.push({
|
||||||
type: 'namespace',
|
type: 'namespace',
|
||||||
longname: v.longname,
|
longname: v.longname,
|
||||||
@@ -217,13 +225,7 @@ function buildNav(members) {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
if (v.kind == 'class') {
|
||||||
}
|
|
||||||
|
|
||||||
if (members.classes.length) {
|
|
||||||
_.each(members.classes, function (v) {
|
|
||||||
// ignore interfaces
|
|
||||||
if (v.interface !== true) {
|
|
||||||
nav.push({
|
nav.push({
|
||||||
type: 'class',
|
type: 'class',
|
||||||
longname: v.longname,
|
longname: v.longname,
|
||||||
@@ -247,9 +249,8 @@ function buildNav(members) {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
return nav;
|
return nav;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user