From d95cbdd9c95fedec3a989fbb61e50b41c1eb011f Mon Sep 17 00:00:00 2001 From: Jeff Williams Date: Fri, 7 Jul 2017 19:48:08 -0700 Subject: [PATCH] support namespaces that are also functions (#955) --- templates/default/publish.js | 6 ++++++ templates/default/static/styles/jsdoc-default.css | 4 ++-- templates/default/tmpl/container.tmpl | 11 ++++++----- templates/default/tmpl/method.tmpl | 2 ++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/templates/default/publish.js b/templates/default/publish.js index a7e80fd6..d62c8a47 100644 --- a/templates/default/publish.js +++ b/templates/default/publish.js @@ -66,6 +66,12 @@ function needsSignature(doclet) { } } } + // and namespaces that are functions get a signature (but finding them is a + // bit messy) + else if (doclet.kind === 'namespace' && doclet.meta && doclet.meta.code && + doclet.meta.code.type && doclet.meta.code.type.match(/[Ff]unction/)) { + needsSig = true; + } return needsSig; } diff --git a/templates/default/static/styles/jsdoc-default.css b/templates/default/static/styles/jsdoc-default.css index c4238bca..9207bc82 100644 --- a/templates/default/static/styles/jsdoc-default.css +++ b/templates/default/static/styles/jsdoc-default.css @@ -222,8 +222,8 @@ thead tr th { border-right: 1px solid #aaa; } tr > th:last-child { border-right: 1px solid #ddd; } -.ancestors { color: #999; } -.ancestors a +.ancestors, .attribs { color: #999; } +.ancestors a, .attribs a { color: #999 !important; text-decoration: none; diff --git a/templates/default/tmpl/container.tmpl b/templates/default/tmpl/container.tmpl index 4bbe3e26..7491fd42 100644 --- a/templates/default/tmpl/container.tmpl +++ b/templates/default/tmpl/container.tmpl @@ -21,13 +21,14 @@
-

+

- -

+
@@ -50,7 +51,7 @@ - + diff --git a/templates/default/tmpl/method.tmpl b/templates/default/tmpl/method.tmpl index e4884c8d..4dd6e0b0 100644 --- a/templates/default/tmpl/method.tmpl +++ b/templates/default/tmpl/method.tmpl @@ -7,8 +7,10 @@ var self = this;

Constructor

+

+