From 684e22f90d2d756a604333ada09db1eae8ccac8f Mon Sep 17 00:00:00 2001 From: Michael Mathews Date: Tue, 10 Aug 2010 18:12:36 +0100 Subject: [PATCH] Added ability to display static properties in Haruki template. --- templates/haruki/publish.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/templates/haruki/publish.js b/templates/haruki/publish.js index 0b5233a9..b6837eff 100644 --- a/templates/haruki/publish.js +++ b/templates/haruki/publish.js @@ -18,8 +18,9 @@ addDocNode(thisNamespace, from, element.path, element.name); } else if (element.kind === 'method') { + var _to = to; if (element.scope === 'static') { - if (to.constructo) { // like a class + if (to.constructor) { // like a class to = to.constructor; } } @@ -45,8 +46,16 @@ "nullable": typeof element.param[i].nullable === 'boolean'? element.param[i].nullable : "" }); } + to = _to; } else if (element.kind === 'property') { + var _to = to; + if (element.scope === 'static') { + if (to.constructor) { // like a class + to = to.constructor; + } + } + if (! to.properties) { to.properties = {}; } @@ -56,6 +65,7 @@ "description" : element.desc || "", "type": element.type? (element.type.length === 1? element.type[0] : element.type) : "" }; + to = _to; } else if (element.kind === 'constructor') { if (! to.classes) {