From 51c8046fcc3b581f112971c7f8947ba9fafe34d3 Mon Sep 17 00:00:00 2001 From: Michael Mathews Date: Thu, 23 Jun 2011 21:50:09 +0100 Subject: [PATCH] Added support in default template for modules that are also classes. --- node_modules/jsdoc/tag.js | 3 ++- templates/default/publish.js | 13 +++++++++++-- templates/default/tmpl/container.tmpl | 4 ++++ test/cases/moduletag3.js | 20 ++++++++++++++++++++ 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 test/cases/moduletag3.js diff --git a/node_modules/jsdoc/tag.js b/node_modules/jsdoc/tag.js index c2173b53..d42500b4 100644 --- a/node_modules/jsdoc/tag.js +++ b/node_modules/jsdoc/tag.js @@ -107,8 +107,9 @@ /** Parse the parameter name and parameter desc from the tag text. - @private + @inner @method parseParamText + @memberof module:jsdoc/tag @param {string} tagText @returns {Array.} [pname, pdesc, poptional, pdefault]. */ diff --git a/templates/default/publish.js b/templates/default/publish.js index 2b360c73..a66011c7 100644 --- a/templates/default/publish.js +++ b/templates/default/publish.js @@ -220,6 +220,7 @@ nav = nav + ''; } + var namespaceNames = data.get( data.find({kind: 'namespace'}) ); if (namespaceNames.length) { nav = nav + '

Namespaces

'; } + var classNames = data.get( data.find({kind: 'class'}) ); if (classNames.length) { nav = nav + '

Classes

'; } - +//console.log('classNames', classNames); + var globalNames = data.get( data.find({kind: ['property', 'function'], 'memberof': {'isUndefined': true}}) ); if (globalNames.length) { diff --git a/templates/default/tmpl/container.tmpl b/templates/default/tmpl/container.tmpl index 8d289a73..edc6ebf1 100644 --- a/templates/default/tmpl/container.tmpl +++ b/templates/default/tmpl/container.tmpl @@ -50,6 +50,10 @@