Fix for issue that caused the type text of a member to not link to the class docs.

This commit is contained in:
Michael Mathews 2011-12-06 23:31:05 +00:00
parent d7e74062b1
commit 064dec21c4
2 changed files with 22 additions and 14 deletions

View File

@ -1,7 +1,7 @@
{
"name": "JSDoc",
"version": "3.0.0alpha",
"revision": "1319671194463",
"revision": "1323214202201",
"description": "An automatic documentation generator for javascript.",
"keywords": [ "documentation", "javascript" ],
"licenses": [

View File

@ -96,7 +96,13 @@
types = f.type.names;
}
f.signature = (f.signature || '') + '<span class="type-signature">'+htmlsafe(types.length? ' :'+types.join('|') : '')+'</span>';
if (types && types.length) {
types = _.map(types, function(t) {
return linkto(t, htmlsafe(t));
});
}
f.signature = (f.signature || '') + '<span class="type-signature">'+(types.length? ' :'+types.join('|') : '')+'</span>';
}
function addAttribs(f) {
@ -134,18 +140,8 @@
//}
data.forEach(function(doclet) {
doclet.signature = '';
doclet.attribs = '';
if (doclet.kind === 'member') {
addSignatureType(doclet);
addAttribs(doclet)
}
if (doclet.kind === 'constant') {
addSignatureType(doclet);
addAttribs(doclet)
}
doclet.attribs = '';
if (doclet.examples) {
doclet.examples = doclet.examples.map(function(example) {
@ -226,6 +222,18 @@
// do this after the urls have all been generated
data.forEach(function(doclet) {
doclet.ancestors = generateAncestry(doclet);
doclet.signature = '';
if (doclet.kind === 'member') {
addSignatureType(doclet);
addAttribs(doclet)
}
if (doclet.kind === 'constant') {
addSignatureType(doclet);
addAttribs(doclet)
}
});
var nav = '',