add show list methods

This commit is contained in:
Aleksey Chichenkov 2018-09-19 13:25:01 +03:00
parent 3478e04a63
commit bbb8ca5fdf
13 changed files with 929 additions and 95 deletions

View File

@ -0,0 +1,50 @@
/**
*
* @class GroupType
* @memberof GroupTypes
*/
function GroupType() {
/**
*
* @public
* @function self
* @returns v2.vc
* @memberof GroupTypes.GroupType
*/
this.self = function() {
};
/**
*
* @public
* @function parent
* @returns v2.vc
* @memberof GroupTypes.GroupType
*/
this.parent = function() {
};
/**
*
* @public
* @function consist
* @returns v2.vc
* @memberof GroupTypes.GroupType
*/
this.consist = function() {
};
/**
*
* @public
* @function attributes
* @returns v2.map(v2.string.type, v2.vc.type)
* @memberof GroupTypes.GroupType
*/
this.attributes = function() {
};
}

20
docfiles/group_types.js Normal file
View File

@ -0,0 +1,20 @@
/**
* Менеджер тип групп.<br>
*
* @namespace GroupTypes
*/
function GroupTypes() {
/**
* Вернет ссылку на Тип группы.
*
* @public
* @function get
* @param model_type groupType Адрес модели
* @returns tools.promise
* @memberof GroupTypes
*/
this.get = function (_groupType) {
};
}

20
docfiles/modelTypes.js Normal file
View File

@ -0,0 +1,20 @@
/**
* Менеджер тип групп.<br>
*
* @namespace ModelTypes
*/
function ModelTypes() {
/**
* Вернет ссылку на Тип группы.
*
* @public
* @function get
* @param v2.string modelType Адрес модели
* @returns tools.promise
* @memberof ModelTypes
*/
this.get = function (modelType) {
};
}

54
docfiles/models/model.js Normal file
View File

@ -0,0 +1,54 @@
/**
* Нода дерева.<br>
* Представляет интефрейс для доступа к данным устройства.<br>
* Позволяет получить список компонентов модели<br>
*
* @class Model
* @memberof Models
*/
function Model() {
/**
*
* @public
* @function address
* @returns v2.address
* @memberof Models.Model
*/
this.address = function() {
};
/**
*
* @public
* @function groups
* @returns tools.promise
* @memberof Models.Model
*/
this.groups = function() {
};
/**
*
* @public
* @function touch
* @returns tools.promise
* @memberof Models.Model
*/
this.touch = function() {
};
/**
*
* @public
* @function debug
* @param v2.address destination
* @param v2.address variables
* @memberof Models.Model
*/
this.debug = function(destination, variables) {
};
}

View File

@ -0,0 +1,30 @@
/**
*
* @class ModelType
* @memberof ModelTypes
*/
function ModelType() {
/**
*
* @public
* @function get_group_type_id
* @param alias
* @returns v2.address
* @memberof ModelTypes.ModelType
*/
this.get_group_type_id = function(alias) {
};
/**
*
* @public
* @function aliases
* @returns v2.map(v2.string, v2.model_type)
* @memberof GroupTypes.GroupType
*/
this.aliases = function() {
};
}

383
example2.json Normal file
View File

@ -0,0 +1,383 @@
[
{
"comment": "/**\n * @class DesktopTree\n * @extends Trees.GlobalAttributeTree\n * @memberof Trees\n */",
"meta": {
"filename": "desktopTree.js",
"lineno": 1,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/desktopTree.js"
},
"kind": "class",
"name": "DesktopTree",
"augments": [
"Trees.GlobalAttributeTree"
],
"memberof": "Trees",
"scope": "static",
"longname": "Trees.DesktopTree",
"___id": "T000002R000006",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "DesktopTree",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>."
]
},
{
"comment": "/**\n * @class Node\n * @extends Trees.GlobalAttributeTree.Node\n * @memberof Trees.DesktopTree\n */",
"meta": {
"filename": "desktopTree.js",
"lineno": 10,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/desktopTree.js"
},
"kind": "class",
"name": "Node",
"augments": [
"Trees.GlobalAttributeTree.Node"
],
"memberof": "Trees.DesktopTree",
"scope": "static",
"longname": "Trees.DesktopTree.Node",
"___id": "T000002R000008",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "Node",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>",
"<a href=\"Trees.DesktopTree.html\">.DesktopTree</a>."
]
},
{
"comment": "/**\n * Отнаследовано от глобального дерева. <br>\n * Ноды этого дерева имеют доступ к атрибутам\n *\n * @class GlobalAttributeTree\n * @extends Trees.GlobalTree\n * @memberof Trees\n */",
"meta": {
"filename": "globalAttributeTree.js",
"lineno": 1,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/globalAttributeTree.js"
},
"description": "Отнаследовано от глобального дерева. <br>\nНоды этого дерева имеют доступ к атрибутам",
"kind": "class",
"name": "GlobalAttributeTree",
"augments": [
"Trees.GlobalTree"
],
"memberof": "Trees",
"scope": "static",
"longname": "Trees.GlobalAttributeTree",
"___id": "T000002R000010",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "GlobalAttributeTree",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>."
]
},
{
"comment": "/**\n * @class Node\n * @extends Trees.GlobalTree.Node\n * @memberof Trees.GlobalAttributeTree\n */",
"meta": {
"filename": "globalAttributeTree.js",
"lineno": 13,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/globalAttributeTree.js"
},
"kind": "class",
"name": "Node",
"augments": [
"Trees.GlobalTree.Node"
],
"memberof": "Trees.GlobalAttributeTree",
"scope": "static",
"longname": "Trees.GlobalAttributeTree.Node",
"___id": "T000002R000012",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "Node",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>",
"<a href=\"Trees.GlobalAttributeTree.html\">.GlobalAttributeTree</a>."
]
},
{
"comment": "/**\n * Интерфейс позволяющей пользователю работать с атрибутами ноды\n *\n * @class Attributes\n * @memberof Trees.GlobalAttributeTree.Node\n */",
"meta": {
"filename": "globalAttributeTree.js",
"lineno": 58,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/globalAttributeTree.js"
},
"description": "Интерфейс позволяющей пользователю работать с атрибутами ноды",
"kind": "class",
"name": "Attributes",
"memberof": "Trees.GlobalAttributeTree.Node",
"scope": "static",
"longname": "Trees.GlobalAttributeTree.Node.Attributes",
"___id": "T000002R000020",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "Attributes",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>",
"<a href=\"Trees.GlobalAttributeTree.html\">.GlobalAttributeTree</a>",
"<a href=\"Trees.GlobalAttributeTree.Node.html\">.Node</a>."
]
},
{
"comment": "/**\n * Глобальное дерево, от которого отнаследованы все остальные. <br>\n * Копирует идеологию ядра. <br>\n * Ноды этого дерева имеют доступ только к списку своих потомков.\n *\n * @class GlobalTree\n * @memberof Trees\n */",
"meta": {
"filename": "globalTree.js",
"lineno": 1,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/globalTree.js"
},
"description": "Глобальное дерево, от которого отнаследованы все остальные. <br>\nКопирует идеологию ядра. <br>\nНоды этого дерева имеют доступ только к списку своих потомков.",
"kind": "class",
"name": "GlobalTree",
"memberof": "Trees",
"scope": "static",
"longname": "Trees.GlobalTree",
"___id": "T000002R000036",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "GlobalTree",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>."
]
},
{
"comment": "/**\n * Нода дерева.<br>\n * Представляет интефрейс для доступа к данным глобальной ноды в ядре.<br>\n * Позволяет узнать потомков ноды<br>\n *\n * @class Node\n * @memberof Trees.GlobalTree\n */",
"meta": {
"filename": "globalTree.js",
"lineno": 51,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/globalTree.js"
},
"description": "Нода дерева.<br>\nПредставляет интефрейс для доступа к данным глобальной ноды в ядре.<br>\nПозволяет узнать потомков ноды<br>",
"kind": "class",
"name": "Node",
"memberof": "Trees.GlobalTree",
"scope": "static",
"longname": "Trees.GlobalTree.Node",
"___id": "T000002R000044",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "Node",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>",
"<a href=\"Trees.GlobalTree.html\">.GlobalTree</a>."
]
},
{
"comment": "/**\n * Интерфейс позволяющей пользователю работать с потомками ноды\n *\n * @class Children\n * @memberof Trees.GlobalTree.Node\n */",
"meta": {
"filename": "globalTree.js",
"lineno": 124,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/globalTree.js"
},
"description": "Интерфейс позволяющей пользователю работать с потомками ноды",
"kind": "class",
"name": "Children",
"memberof": "Trees.GlobalTree.Node",
"scope": "static",
"longname": "Trees.GlobalTree.Node.Children",
"___id": "T000002R000056",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "Children",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>",
"<a href=\"Trees.GlobalTree.html\">.GlobalTree</a>",
"<a href=\"Trees.GlobalTree.Node.html\">.Node</a>."
]
},
{
"comment": "/**\n * @class RemoteModulesTree\n * @extends Trees.GlobalAttributeTree\n * @memberof Trees\n */",
"meta": {
"filename": "remoteModulesTree.js",
"lineno": 4,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/remoteModulesTree.js"
},
"kind": "class",
"name": "RemoteModulesTree",
"augments": [
"Trees.GlobalAttributeTree"
],
"memberof": "Trees",
"scope": "static",
"longname": "Trees.RemoteModulesTree",
"___id": "T000002R000062",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "RemoteModulesTree",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>."
]
},
{
"comment": "/**\n * @class Node\n * @extends Trees.GlobalAttributeTree.Node\n * @memberof Trees.RemoteModulesTree\n */",
"meta": {
"filename": "remoteModulesTree.js",
"lineno": 13,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/remoteModulesTree.js"
},
"kind": "class",
"name": "Node",
"augments": [
"Trees.GlobalAttributeTree.Node"
],
"memberof": "Trees.RemoteModulesTree",
"scope": "static",
"longname": "Trees.RemoteModulesTree.Node",
"___id": "T000002R000064",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "Node",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>",
"<a href=\"Trees.RemoteModulesTree.html\">.RemoteModulesTree</a>."
]
},
{
"comment": "/**\n * @class SchemeTree\n * @extends Trees.GlobalTree\n * @memberof Trees\n */",
"meta": {
"filename": "schemeTree.js",
"lineno": 1,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/schemeTree.js"
},
"kind": "class",
"name": "SchemeTree",
"augments": [
"Trees.GlobalTree"
],
"memberof": "Trees",
"scope": "static",
"longname": "Trees.SchemeTree",
"___id": "T000002R000066",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "SchemeTree",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>."
]
},
{
"comment": "/**\n * @class Node\n * @extends Trees.GlobalTree.Node\n * @memberof Trees.SchemeTree\n */",
"meta": {
"filename": "schemeTree.js",
"lineno": 10,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/schemeTree.js"
},
"kind": "class",
"name": "Node",
"augments": [
"Trees.GlobalTree.Node"
],
"memberof": "Trees.SchemeTree",
"scope": "static",
"longname": "Trees.SchemeTree.Node",
"___id": "T000002R000068",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "Node",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>",
"<a href=\"Trees.SchemeTree.html\">.SchemeTree</a>."
]
},
{
"comment": "/**\n * @class UserAttributeTree\n * @extends Trees.GlobalAttributeTree\n * @memberof Trees\n */",
"meta": {
"filename": "userAttributeTree.js",
"lineno": 1,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/userAttributeTree.js"
},
"kind": "class",
"name": "UserAttributeTree",
"augments": [
"Trees.GlobalAttributeTree"
],
"memberof": "Trees",
"scope": "static",
"longname": "Trees.UserAttributeTree",
"___id": "T000002R000070",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "UserAttributeTree",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>."
]
},
{
"comment": "/**\n * @class Node\n * @extends Trees.GlobalAttributeTree.Node\n * @memberof Trees.UserAttributeTree\n */",
"meta": {
"filename": "userAttributeTree.js",
"lineno": 10,
"columnno": 0,
"path": "/home/chichenkov/work/docsgen/docfiles/trees",
"code": {},
"shortpath": "trees/userAttributeTree.js"
},
"kind": "class",
"name": "Node",
"augments": [
"Trees.GlobalAttributeTree.Node"
],
"memberof": "Trees.UserAttributeTree",
"scope": "static",
"longname": "Trees.UserAttributeTree.Node",
"___id": "T000002R000072",
"___s": true,
"attribs": "<span class=\"type-signature\"></span>",
"id": "Node",
"signature": "<span class=\"signature\">()</span><span class=\"type-signature\"></span>",
"ancestors": [
"<a href=\"Trees.html\">Trees</a>",
"<a href=\"Trees.UserAttributeTree.html\">.UserAttributeTree</a>."
]
}
]

View File

@ -340,42 +340,7 @@ function buildMemberNav(items, itemHeading, itemsSeen, linktoFn) {
}
function buildMemberNavNamespace(items, itemHeading, itemsSeen, linktoFn) {
var nav = '';
if (items.length) {
var itemsNav = '';
items.forEach(function(item) {
var displayName;
if ( !hasOwnProp.call(item, 'longname') ) {
itemsNav += '<li>' + linktoFn('', item.name) + '</li>';
}
else if ( !hasOwnProp.call(itemsSeen, item.longname) ) {
displayName = item.longname;
var arr = displayName.split(".");
var end_id = arr.length - 1;
var last = arr.pop();
var prev_name = arr.join(".");
var res = "";
// res += "<span title='"+item.comment+"'>";
if (arr.length > 0) res += "<span class='__prev'>" +prev_name+ ".</span>";
res += "<span class='__end'>" +last+ "</span>";
itemsNav += '<li>' + linktoFn(item.longname, res.replace(/\b(module|event):/g, '')) + '</li>';
// itemsNav += "</span>";
itemsSeen[item.longname] = true;
}
});
if (itemsNav !== '') {
nav += '<h3>' + itemHeading + '</h3><ul>' + itemsNav + '</ul>';
}
}
return nav;
}
function buildMemberNavNamespacesTree(items, itemHeading, itemsSeen, linktoFn) {
var nav = '';
@ -492,45 +457,182 @@ function linktoExternal(longName, name) {
* @param {array<object>} members.interfaces
* @return {string} The HTML for the navigation sidebar.
*/
function buildNav(members) {
var globalNav;
var nav = '<h2><a href="index.html">Home</a></h2>';
var seen = {};
var seenTutorials = {};
// function buildNav(members) {
// var globalNav;
// var nav = '<h2><a href="index.html">Home</a></h2>';
// var seen = {};
// var seenTutorials = {};
//
// nav += buildMemberNav(members.modules, 'Modules', {}, linkto);
// nav += buildMemberNav(members.externals, 'Externals', seen, linktoExternal);
// nav += buildMemberNavNamespace(members.namespaces, 'Managers', seen, linkto);
// nav += buildMemberNavNamespace(members.classes, 'Classes', seen, linkto);
// nav += buildMemberNav(members.events, 'Events', seen, linkto);
// // nav += buildMemberNavNamespaces(members.namespaces, 'Namespaces', seen, linkto);
// // nav += buildMemberNav(members.namespaces, 'Namespaces', seen, linkto);
// nav += buildMemberNav(members.mixins, 'Mixins', seen, linkto);
// nav += buildMemberNav(members.tutorials, 'Tutorials', seenTutorials, linktoTutorial);
// nav += buildMemberNav(members.interfaces, 'Interfaces', seen, linkto);
//
// if (members.globals.length) {
// globalNav = '';
//
// members.globals.forEach(function(g) {
// if ( g.kind !== 'typedef' && !hasOwnProp.call(seen, g.longname) ) {
// globalNav += '<li>' + linkto(g.longname, g.name) + '</li>';
// }
// seen[g.longname] = true;
// });
//
// if (!globalNav) {
// // turn the heading into a link so you can actually get to the global page
// nav += '<h3>' + linkto('global', 'Global') + '</h3>';
// }
// else {
// nav += '<h3>Global</h3><ul>' + globalNav + '</ul>';
// }
// }
//
// return nav;
// }
nav += buildMemberNav(members.modules, 'Modules', {}, linkto);
nav += buildMemberNav(members.externals, 'Externals', seen, linktoExternal);
nav += buildMemberNavNamespace(members.namespaces, 'Managers', seen, linkto);
nav += buildMemberNavNamespace(members.classes, 'Classes', seen, linkto);
nav += buildMemberNav(members.events, 'Events', seen, linkto);
// nav += buildMemberNavNamespaces(members.namespaces, 'Namespaces', seen, linkto);
// nav += buildMemberNav(members.namespaces, 'Namespaces', seen, linkto);
nav += buildMemberNav(members.mixins, 'Mixins', seen, linkto);
nav += buildMemberNav(members.tutorials, 'Tutorials', seenTutorials, linktoTutorial);
nav += buildMemberNav(members.interfaces, 'Interfaces', seen, linkto);
function buildMemberNavNamespace(items, itemHeading, itemsSeen, linktoFn) {
var nav = '';
if (members.globals.length) {
globalNav = '';
console.log("buildMemberNavNamespace");
console.log("items", JSON.stringify(items, true, 3));
console.log("itemHeading", JSON.stringify(itemHeading, true, 3));
console.log("itemsSeen", JSON.stringify(itemsSeen, true, 3));
console.log("linktoFn", JSON.stringify(linktoFn, true, 3));
members.globals.forEach(function(g) {
if ( g.kind !== 'typedef' && !hasOwnProp.call(seen, g.longname) ) {
globalNav += '<li>' + linkto(g.longname, g.name) + '</li>';
if (items.length) {
var itemsNav = '';
items.forEach(function(item) {
var displayName;
if ( !hasOwnProp.call(item, 'longname') ) {
itemsNav += '<li>' + linktoFn('', item.name) + '</li>';
}
else if ( !hasOwnProp.call(itemsSeen, item.longname) ) {
displayName = item.longname;
var arr = displayName.split(".");
var end_id = arr.length - 1;
var last = arr.pop();
var prev_name = arr.join(".");
var res = "";
// res += "<span title='"+item.comment+"'>";
if (arr.length > 0) res += "<span class='__prev'>" +prev_name+ ".</span>";
res += "<span class='__end'>" +last+ "</span>";
itemsNav += '<li>' + linktoFn(item.longname, res.replace(/\b(module|event):/g, '')) + '</li>';
// itemsNav += "</span>";
itemsSeen[item.longname] = true;
}
seen[g.longname] = true;
});
if (!globalNav) {
// turn the heading into a link so you can actually get to the global page
nav += '<h3>' + linkto('global', 'Global') + '</h3>';
}
else {
nav += '<h3>Global</h3><ul>' + globalNav + '</ul>';
if (itemsNav !== '') {
nav += '<h3>' + itemHeading + '</h3><ul>' + itemsNav + '</ul>';
}
}
return nav;
}
function buildNav(members) {
var nav = '<h2><a href="index.html">GUI 2.9.1-develop</a></h2>';
// var seen = {};
// nav += buildMemberNavNamespace(members.namespaces, 'Managers', seen, linkto);
// nav += buildMemberNavNamespace(members.classes, 'Classes', seen, linkto);
nav += render_explorer(members.namespaces, members.classes);
return nav;
}
var render_explorer = function (_nss, _clss) {
var nav = "";
nav += render_managers(_nss, _clss);
return nav;
};
var render_managers = function (_nss, _clss) {
var nav = "";
nav += "<ul class='managers ddm'>";
nav += "<div class='title'>Managers</div>";
for (var a = 0; a < _nss.length; a++) {
var ns = _nss[a];
var managers = find_managers(ns.name, _clss);
nav += "<li class='dropdown'>";
if(managers.length > 0) {
nav += linkto(ns.longname, ns.name + "<i class=\"icon-arrow\"></i>", "menu-title");
} else {
nav += linkto(ns.longname, ns.name, "menu-title");
}
if(managers.length > 0) {
nav += "<ul id='" + ns.name + "' class='dropdown-menu'>";
for (var b = 0; b < managers.length; b++) {
var manager = managers[b];
var li_start = "<li class=\"manager\">";
var link = linkto(manager.longname, manager.name);
var li_end = "</li>";
nav += li_start + link + li_end;
}
nav += "</ul>";
}
nav += "</li>";
}
nav += "</ul>";
return nav;
};
var find_managers = function (_parent, _clss) {
var members = [];
for(var a = 0; a < _clss.length; a++ ) {
var cls = _clss[a];
var hierarchy = cls.memberof.split(".");
if (hierarchy.length == 1 && hierarchy[0] === "") {
continue;
}
var found = false;
for(var b = 0; b < hierarchy.length; b++ ) {
var hop = hierarchy[b];
if(hop == _parent) {
found = true;
break;
}
}
// var cls_hierarchy = cls
var member_success = found && hierarchy.length - b < 2;
// console.log("_parent", _parent);
// console.log("cls", JSON.stringify(cls, true, 3));
// console.log("found", found);
// console.log("hierarchy.length - b", hierarchy.length - b);
if(!member_success) continue;
members.push(cls);
}
return members;
};
/**
@param {TAFFY} taffyData See <http://taffydb.com/>.
@param {object} opts

View File

@ -0,0 +1,65 @@
/**
* Created by Aleksey Chichenkov <a.chichenkov@initi.ru> on 9/19/18.
*/
window.onload = function () {
create();
};
function create() {
var hop = location.href.split("/").pop().split(".");
hop.pop();
var current_manager = hop[hop.length - 1];
var parent = hop[hop.length - 2];
var dropdown = document.querySelectorAll('.dropdown');
var dropdownArray = Array.prototype.slice.call(dropdown, 0);
dropdownArray.forEach(function (el) {
var button = el.querySelector('a.menu-title');
var menu = el.querySelector('.dropdown-menu');
if (!menu) return;
var arrow = button.querySelector('i.icon-arrow');
var item = menu.getAttribute("id");
var show = true;
var cur_parent = menu.parentNode.children[1] && menu.parentNode.children[1].getAttribute("id");
if (cur_parent) {
show = cur_parent != parent;
}
if (show && item == current_manager || parent && item == parent) {
menu.classList.add('show');
menu.classList.remove('hide');
arrow.classList.add('open');
arrow.classList.remove('close');
event.preventDefault();
}
button.onclick = function (event) {
var item = event.target.parentNode.children[1] && event.target.parentNode.children[1].getAttribute("id");
var current_page = item && item == current_manager;
if (!menu.hasClass('show')) {
menu.classList.add('show');
menu.classList.remove('hide');
arrow.classList.add('open');
arrow.classList.remove('close');
}
else {
menu.classList.remove('show');
menu.classList.add('hide');
arrow.classList.remove('open');
arrow.classList.add('close');
}
current_page && event.preventDefault();
};
});
Element.prototype.hasClass = function (className) {
return this.className && new RegExp("(^|\\s)" + className + "(\\s|$)").test(this.className);
};
}

View File

@ -0,0 +1,99 @@
*, *:before, *:after {
-webkit-border-sizing: border-box;
-moz-border-sizing: border-box;
border-sizing: border-box;
}
.ddm {
list-style: none;
padding: 0;
margin: 0 0 20px 0;
}
.dropdown a {
text-decoration: none;
}
.dropdown .menu-title {
position: relative;
display: block;
color: white;
background: #2980B9;
-moz-box-shadow: 0 1px 0 #409ad5 inset, 0 -1px 0 #20638f inset;
-webkit-box-shadow: 0 1px 0 #409ad5 inset, 0 -1px 0 #20638f inset;
box-shadow: 0 1px 0 #409ad5 inset, 0 -1px 0 #20638f inset;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
padding: 6px;
font-size: 20px;
}
.dropdown .menu-title:hover {
background: #2c89c6;
}
.dropdown .icon-arrow {
position: absolute;
display: block;
font-size: 0.7em;
color: #fff;
top: 10px;
right: 10px;
}
.dropdown .icon-arrow.open {
-moz-transform: rotate(-180deg);
-ms-transform: rotate(-180deg);
-webkit-transform: rotate(-180deg);
transform: rotate(-180deg);
}
.dropdown .icon-arrow.close {
-moz-transform: rotate(0deg);
-ms-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
.dropdown .icon-arrow:before {
content: '\25BC';
}
.dropdown .dropdown-menu {
max-height: 0;
overflow: hidden;
list-style: none;
padding: 0;
margin: 0;
}
.dropdown .dropdown-menu li {
padding: 0;
}
.dropdown .dropdown-menu li a {
display: block;
color: #232323;
background: #EEE;
-moz-box-shadow: 0 1px 0 white inset, 0 -1px 0 #d5d5d5 inset;
-webkit-box-shadow: 0 1px 0 white inset, 0 -1px 0 #d5d5d5 inset;
box-shadow: 0 1px 0 white inset, 0 -1px 0 #d5d5d5 inset;
text-shadow: 0 -1px 0 rgba(255, 255, 255, 0.3);
padding: 6px 10px;
}
.dropdown .dropdown-menu li a:hover {
background: #f6f6f6;
}
.dropdown .show, .dropdown .hide {
-moz-transform-origin: 50% 0%;
-ms-transform-origin: 50% 0%;
-webkit-transform-origin: 50% 0%;
transform-origin: 50% 0%;
}
.dropdown .show {
display: block;
max-height: 9999px;
-moz-transform: scaleY(1);
-ms-transform: scaleY(1);
-webkit-transform: scaleY(1);
transform: scaleY(1);
}
.dropdown .hide {
max-height: 0;
-moz-transform: scaleY(0);
-ms-transform: scaleY(0);
-webkit-transform: scaleY(0);
transform: scaleY(0);
}

View File

@ -0,0 +1,4 @@
ul div.title {
font-size: 25px;
margin-bottom: 5px;
}

View File

@ -73,8 +73,10 @@ tt, code, kbd, samp {
}
#main {
float: left;
width: 75%;
float: right;
width: 85%;
box-sizing: border-box;
padding-left: 10px;
}
article dl {
@ -126,40 +128,40 @@ section
nav
{
display: block;
float: right;
margin-top: 28px;
width: 25%;
float: left;
width: 15%;
box-sizing: border-box;
border-left: 1px solid #ccc;
padding-left: 16px;
right: 0px;
border-right: 1px solid #ccc;
height: -webkit-fill-available;
position: fixed;
overflow: scroll;
overflow: auto;
padding-left: 16px;
padding-right: 16px;
}
nav ul {
font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;
font-size: 100%;
line-height: 17px;
padding: 0;
margin: 0;
list-style-type: none;
}
/*nav ul {*/
/*font-family: 'Lucida Grande', 'Lucida Sans Unicode', arial, sans-serif;*/
/*font-size: 100%;*/
/*line-height: 17px;*/
/*padding: 0;*/
/*margin: 0;*/
/*list-style-type: none;*/
/*}*/
nav ul a, nav ul a:visited, nav ul a:active {
/*font-family: Consolas, Monaco, 'Andale Mono', monospace;*/
line-height: 18px;
color: #4D4E53;
}
/*nav ul a, nav ul a:visited, nav ul a:active {*/
/*!*font-family: Consolas, Monaco, 'Andale Mono', monospace;*!*/
/*line-height: 18px;*/
/*color: #4D4E53;*/
/*}*/
nav h3 {
margin-top: 12px;
}
/*nav h3 {*/
/*margin-top: 12px;*/
/*}*/
nav li {
margin-top: 6px;
}
/*nav li {*/
/*margin-top: 6px;*/
/*}*/
footer {
display: block;

View File

@ -6,11 +6,14 @@
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<script src="scripts/dd-menu.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
<link type="text/css" rel="stylesheet" href="styles/dd-menu.css">
<link type="text/css" rel="stylesheet" href="styles/explorer.css">
</head>
<body>
@ -20,6 +23,10 @@
<h1 class="page-title"><?js= title ?></h1>
<?js= content ?>
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc <?js= env.version.number ?></a><?js if(env.conf.templates && env.conf.templates.default && env.conf.templates.default.includeDate !== false) { ?> on <?js= (new Date()) ?><?js } ?>
</footer>
</div>
<nav>
@ -28,10 +35,6 @@
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc <?js= env.version.number ?></a><?js if(env.conf.templates && env.conf.templates.default && env.conf.templates.default.includeDate !== false) { ?> on <?js= (new Date()) ?><?js } ?>
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>

View File

@ -17,6 +17,7 @@ var self = this;
while(a < data.params.length){
var param = data.params[a];
if(!param) { a++; continue; }
console.log(JSON.stringify(param,true,3))
var type = param.type.names[0];
?>
<span class="param">
@ -25,7 +26,8 @@ var self = this;
<span class="name"><?js= type ?></span>
<span class="right-quad-bracket"> ]</span>
</span>
<span class="name"><?js= param.name ?></span>
<span class="name"><?js= param.name ?></span><?js if(a < data.params.length - 1) { ?>,<?js } ?>
</span>
<?js
a++;