diff options
Diffstat (limited to 'tools/jsdoc-toolkit-2.4.0/templates')
20 files changed, 2447 insertions, 0 deletions
diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/allclasses.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/allclasses.tmpl new file mode 100644 index 0000000..32f4358 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/allclasses.tmpl @@ -0,0 +1,17 @@ +<div align="center">{+new Link().toFile("index.html").withText("Class Index")+} +| {+new Link().toFile("files.html").withText("File Index")+}</div> +<hr /> +<h2>Classes</h2> +<ul class="classList"> + <for each="thisClass" in="data"> + <li>{! + if (thisClass.alias == "_global_") { + output += "<i>"+new Link().toClass(thisClass.alias)+"</i>"; + } + else { + output += new Link().toClass(thisClass.alias); + } + !}</li> + </for> +</ul> +<hr />
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/allfiles.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/allfiles.tmpl new file mode 100644 index 0000000..4c7de1c --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/allfiles.tmpl @@ -0,0 +1,56 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" /> + {! Link.base = ""; /* all generated links will be relative to this */ !} + <title>JsDoc Reference - File Index</title> + <meta name="generator" content="JsDoc Toolkit" /> + + <style type="text/css"> + {+include("static/default.css")+} + </style> + </head> + + <body> + {+include("static/header.html")+} + + <div id="index"> + {+publish.classesIndex+} + </div> + + <div id="content"> + <h1 class="classTitle">File Index</h1> + + <for each="item" in="data"> + <div> + <h2>{+new Link().toSrc(item.alias).withText(item.name)+}</h2> + <if test="item.desc">{+resolveLinks(item.desc)+}</if> + <dl> + <if test="item.author"> + <dt class="heading">Author:</dt> + <dd>{+item.author+}</dd> + </if> + <if test="item.version"> + <dt class="heading">Version:</dt> + <dd>{+item.version+}</dd> + </if> + {! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !} + <if test="locations.length"> + <dt class="heading">Location:</dt> + <for each="location" in="locations"> + <dd><a href="{+location+}">{+location+}</a></dd> + </for> + </if> + </dl> + </div> + <hr /> + </for> + + </div> + <div class="fineprint" style="clear:both"> + <if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if> + Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+} + </div> + </body> +</html>
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/class.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/class.tmpl new file mode 100644 index 0000000..1b32e4a --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/class.tmpl @@ -0,0 +1,649 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" /> + <meta name="generator" content="JsDoc Toolkit" /> + {! Link.base = "../"; /* all generated links will be relative to this */ !} + <title>JsDoc Reference - {+data.alias+}</title> + + <style type="text/css"> + {+include("static/default.css")+} + </style> + </head> + + <body> +<!-- ============================== header ================================= --> + <!-- begin static/header.html --> + {+include("static/header.html")+} + <!-- end static/header.html --> + +<!-- ============================== classes index ============================ --> + <div id="index"> + <!-- begin publish.classesIndex --> + {+publish.classesIndex+} + <!-- end publish.classesIndex --> + </div> + + <div id="content"> +<!-- ============================== class title ============================ --> + <h1 class="classTitle"> + {! + var classType = ""; + + if (data.isBuiltin()) { + classType += "Built-In "; + } + + if (data.isNamespace) { + if (data.is('FUNCTION')) { + classType += "Function "; + } + classType += "Namespace "; + } + else { + classType += "Class "; + } + !} + {+classType+}{+data.alias+} + </h1> + +<!-- ============================== class summary ========================== --> + <p class="description"> + <if test="data.version"><br />Version + {+ data.version +}.<br /> + </if> + <if test="data.augments.length"><br />Extends + {+ + data.augments + .sort() + .map( + function($) { return new Link().toSymbol($); } + ) + .join(", ") + +}.<br /> + </if> + + {+resolveLinks(data.classDesc)+} + + <if test="!data.isBuiltin()">{# isn't defined in any file #} + <br /><i>Defined in: </i> {+new Link().toSrc(data.srcFile)+}. + </if> + </p> + +<!-- ============================== constructor summary ==================== --> + <if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))"> + <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class {+data.alias+}."> + <caption>{+classType+}Summary</caption> + <thead> + <tr> + <th scope="col">Constructor Attributes</th> + <th scope="col">Constructor Name and Description</th> + </tr> + </thead> + <tbody> + <tr> + <td class="attributes">{! + if (data.isPrivate) output += "<private> "; + if (data.isInner) output += "<inner> "; + !} </td> + <td class="nameDescription" {!if (data.comment.getTag("hilited").length){output += 'style="color: red"'}!}> + <div class="fixedFont"> + <b>{+ new Link().toSymbol(data.alias).inner('constructor')+}</b><if test="classType != 'Namespace '">{+ makeSignature(data.params) +}</if> + </div> + <div class="description">{+resolveLinks(summarize(data.desc))+}</div> + </td> + </tr> + </tbody> + </table> + </if> + +<!-- ============================== properties summary ===================== --> + <if test="data.properties.length"> + {! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} + <if test="ownProperties.length"> + <table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class {+data.alias+}."> + <caption>Field Summary</caption> + <thead> + <tr> + <th scope="col">Field Attributes</th> + <th scope="col">Field Name and Description</th> + </tr> + </thead> + <tbody> + <for each="member" in="ownProperties"> + <tr> + <td class="attributes">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + if (member.isConstant) output += "<constant> "; + !} </td> + <td class="nameDescription"> + <div class="fixedFont"> + <if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b> + </div> + <div class="description">{+resolveLinks(summarize(member.desc))+}</div> + </td> + </tr> + </for> + </tbody> + </table> + </if> + + <if test="data.inheritsFrom.length"> + <dl class="inheritsList"> + {! + var borrowedMembers = data.properties.filter(function($) {return $.memberOf != data.alias}); + + var contributers = []; + borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); + for (var i = 0, l = contributers.length; i < l; i++) { + output += + "<dt>Fields borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>" + + + "<dd>" + + borrowedMembers + .filter( + function($) { return $.memberOf == contributers[i] } + ) + .sort(makeSortby("name")) + .map( + function($) { return new Link().toSymbol($.alias).withText($.name) } + ) + .join(", ") + + + "</dd>"; + } + !} + </dl> + </if> + </if> + +<!-- ============================== methods summary ======================== --> + <if test="data.methods.length"> + {! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} + <if test="ownMethods.length"> + <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class {+data.alias+}."> + <caption>Method Summary</caption> + <thead> + <tr> + <th scope="col">Method Attributes</th> + <th scope="col">Method Name and Description</th> + </tr> + </thead> + <tbody> + <for each="member" in="ownMethods"> + <tr> + <td class="attributes">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + !} </td> + <td class="nameDescription"> + <div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name.replace(/\^\d+$/, ''))+}</b>{+makeSignature(member.params)+} + </div> + <div class="description">{+resolveLinks(summarize(member.desc))+}</div> + </td> + </tr> + </for> + </tbody> + </table> + </if> + + <if test="data.inheritsFrom.length"> + <dl class="inheritsList"> + {! + var borrowedMembers = data.methods.filter(function($) {return $.memberOf != data.alias}); + var contributers = []; + borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); + for (var i = 0, l = contributers.length; i < l; i++) { + output += + "<dt>Methods borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>" + + + "<dd>" + + borrowedMembers + .filter( + function($) { return $.memberOf == contributers[i] } + ) + .sort(makeSortby("name")) + .map( + function($) { return new Link().toSymbol($.alias).withText($.name) } + ) + .join(", ") + + + "</dd>"; + } + + !} + </dl> + </if> + </if> +<!-- ============================== events summary ======================== --> + <if test="data.events.length"> + {! var ownEvents = data.events.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} + <if test="ownEvents.length"> + <table class="summaryTable" cellspacing="0" summary="A summary of the events documented in the class {+data.alias+}."> + <caption>Event Summary</caption> + <thead> + <tr> + <th scope="col">Event Attributes</th> + <th scope="col">Event Name and Description</th> + </tr> + </thead> + <tbody> + <for each="member" in="ownEvents"> + <tr> + <td class="attributes">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + !} </td> + <td class="nameDescription"> + <div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>{+makeSignature(member.params)+} + </div> + <div class="description">{+resolveLinks(summarize(member.desc))+}</div> + </td> + </tr> + </for> + </tbody> + </table> + </if> + + <if test="data.inheritsFrom.length"> + <dl class="inheritsList"> + {! + var borrowedMembers = data.events.filter(function($) {return $.memberOf != data.alias}); + var contributers = []; + borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); + for (var i = 0, l = contributers.length; i < l; i++) { + output += + "<dt>Events borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>" + + + "<dd>" + + borrowedMembers + .filter( + function($) { return $.memberOf == contributers[i] } + ) + .sort(makeSortby("name")) + .map( + function($) { return new Link().toSymbol($.alias).withText($.name) } + ) + .join(", ") + + + "</dd>"; + } + + !} + </dl> + </if> + </if> + +<!-- ============================== constructor details ==================== --> + <if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))"> + <div class="details"><a name="constructor"> </a> + <div class="sectionTitle"> + {+classType+}Detail + </div> + + <div class="fixedFont">{! + if (data.isPrivate) output += "<private> "; + if (data.isInner) output += "<inner> "; + !} + <b>{+ data.alias +}</b><if test="classType != 'Namespace '">{+ makeSignature(data.params) +}</if> + </div> + + <div class="description"> + {+resolveLinks(data.desc)+} + <if test="data.author"><br /><i>Author: </i>{+data.author+}.</if> + </div> + + <if test="data.example.length"> + <for each="example" in="data.example"> + <pre class="code">{+example+}</pre> + </for> + </if> + + + <if test="data.params.length"> + <dl class="detailList"> + <dt class="heading">Parameters:</dt> + <for each="item" in="data.params"> + <dt> + {+((item.type)?""+("<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type)+"}</span> ")) : "")+} <b>{+item.name+}</b> + <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if> + </dt> + <dd>{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="data.deprecated"> + <dl class="detailList"> + <dt class="heading">Deprecated:</dt> + <dt> + {+resolveLinks(data.deprecated)+} + </dt> + </dl> + </if> + <if test="data.since"> + <dl class="detailList"> + <dt class="heading">Since:</dt> + <dd>{+ data.since +}</dd> + </dl> + </if> + <if test="data.exceptions.length"> + <dl class="detailList"> + <dt class="heading">Throws:</dt> + <for each="item" in="data.exceptions"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b> + </dt> + <dd>{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="data.returns.length"> + <dl class="detailList"> + <dt class="heading">Returns:</dt> + <for each="item" in="data.returns"> + <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="data.requires.length"> + <dl class="detailList"> + <dt class="heading">Requires:</dt> + <for each="item" in="data.requires"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + <if test="data.see.length"> + <dl class="detailList"> + <dt class="heading">See:</dt> + <for each="item" in="data.see"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + + </div> + </if> + +<!-- ============================== field details ========================== --> + <if test="defined(ownProperties) && ownProperties.length"> + <div class="sectionTitle"> + Field Detail + </div> + <for each="member" in="ownProperties"> + <a name="{+Link.symbolNameToLinkName(member)+}"> </a> + <div class="fixedFont">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + if (member.isConstant) output += "<constant> "; + !} + + <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if> + <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b> + + </div> + <div class="description"> + {+resolveLinks(member.desc)+} + <if test="member.srcFile != data.srcFile"> + <br /> + <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}. + </if> + <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if> + </div> + + <if test="member.example.length"> + <for each="example" in="member.example"> + <pre class="code">{+example+}</pre> + </for> + </if> + + <if test="member.deprecated"> + <dl class="detailList"> + <dt class="heading">Deprecated:</dt> + <dt> + {+ resolveLinks(member.deprecated) +} + </dt> + </dl> + </if> + <if test="member.since"> + <dl class="detailList"> + <dt class="heading">Since:</dt> + <dd>{+ member.since +}</dd> + </dl> + </if> + <if test="member.see.length"> + <dl class="detailList"> + <dt class="heading">See:</dt> + <for each="item" in="member.see"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + <if test="member.defaultValue"> + <dl class="detailList"> + <dt class="heading">Default Value:</dt> + <dd> + {+resolveLinks(member.defaultValue)+} + </dd> + </dl> + </if> + + <if test="!$member_last"><hr /></if> + </for> + </if> + +<!-- ============================== method details ========================= --> + <if test="defined(ownMethods) && ownMethods.length"> + <div class="sectionTitle"> + Method Detail + </div> + <for each="member" in="ownMethods"> + <a name="{+Link.symbolNameToLinkName(member)+}"> </a> + <div class="fixedFont">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + !} + + <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if> + <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name.replace(/\^\d+$/, '')+}</b>{+makeSignature(member.params)+} + + </div> + <div class="description"> + {+resolveLinks(member.desc)+} + <if test="member.srcFile != data.srcFile"> + <br /> + <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}. + </if> + <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if> + </div> + + <if test="member.example.length"> + <for each="example" in="member.example"> + <pre class="code">{+example+}</pre> + </for> + </if> + + <if test="member.params.length"> + <dl class="detailList"> + <dt class="heading">Parameters:</dt> + <for each="item" in="member.params"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b> + <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if> + </dt> + <dd>{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="member.deprecated"> + <dl class="detailList"> + <dt class="heading">Deprecated:</dt> + <dt> + {+ resolveLinks(member.deprecated) +} + </dt> + </dl> + </if> + <if test="member.since"> + <dl class="detailList"> + <dt class="heading">Since:</dt> + <dd>{+ member.since +}</dd> + </dl> + </dl> + </if> + <if test="member.exceptions.length"> + <dl class="detailList"> + <dt class="heading">Throws:</dt> + <for each="item" in="member.exceptions"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b> + </dt> + <dd>{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="member.returns.length"> + <dl class="detailList"> + <dt class="heading">Returns:</dt> + <for each="item" in="member.returns"> + <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="member.requires.length"> + <dl class="detailList"> + <dt class="heading">Requires:</dt> + <for each="item" in="member.requires"> + <dd>{+ resolveLinks(item) +}</dd> + </for> + </dl> + </if> + <if test="member.see.length"> + <dl class="detailList"> + <dt class="heading">See:</dt> + <for each="item" in="member.see"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + + <if test="!$member_last"><hr /></if> + </for> + </if> + +<!-- ============================== event details ========================= --> + <if test="defined(ownEvents) && ownEvents.length"> + <div class="sectionTitle"> + Event Detail + </div> + <for each="member" in="ownEvents"> + <a name="{+Link.symbolNameToLinkName(member)+}"> </a> + <div class="fixedFont">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + !} + + <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if> + <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>{+makeSignature(member.params)+} + + </div> + <div class="description"> + {+resolveLinks(member.desc)+} + <if test="member.srcFile != data.srcFile"> + <br /> + <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}. + </if> + <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if> + </div> + + <if test="member.example.length"> + <for each="example" in="member.example"> + <pre class="code">{+example+}</pre> + </for> + </if> + + <if test="member.params.length"> + <dl class="detailList"> + <dt class="heading">Parameters:</dt> + <for each="item" in="member.params"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b> + <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if> + </dt> + <dd>{+ resolveLinks(item.desc) +}</dd> + </for> + </dl> + </if> + <if test="member.deprecated"> + <dl class="detailList"> + <dt class="heading">Deprecated:</dt> + <dt> + {+ resolveLinks(member.deprecated) +} + </dt> + </dl> + </if> + <if test="member.since"> + <dl class="detailList"> + <dt class="heading">Since:</dt> + <dd>{+ member.since +}</dd> + </dl> + </dl> + </if> + <if test="member.exceptions.length"> + <dl class="detailList"> + <dt class="heading">Throws:</dt> + <for each="item" in="member.exceptions"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b> + </dt> + <dd>{+ resolveLinks(item.desc) +}</dd> + </for> + </dl> + </if> + <if test="member.returns.length"> + <dl class="detailList"> + <dt class="heading">Returns:</dt> + <for each="item" in="member.returns"> + <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="member.requires.length"> + <dl class="detailList"> + <dt class="heading">Requires:</dt> + <for each="item" in="member.requires"> + <dd>{+ resolveLinks(item) +}</dd> + </for> + </dl> + </if> + <if test="member.see.length"> + <dl class="detailList"> + <dt class="heading">See:</dt> + <for each="item" in="member.see"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + + <if test="!$member_last"><hr /></if> + </for> + </if> + + <hr /> + </div> + + +<!-- ============================== footer ================================= --> + <div class="fineprint" style="clear:both"> + <if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if> + Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+} + </div> + </body> +</html> diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/index.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/index.tmpl new file mode 100644 index 0000000..e6066a7 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/index.tmpl @@ -0,0 +1,38 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" /> + + <title>FiveUI Prelude Reference</title> + <meta name="generator" content="JsDoc Toolkit" /> + + <style type="text/css"> + {+include("static/default.css")+} + {+include("static/preludeIntro.css")+} + </style> + </head> + <body> + {+include("static/header.html")+} + + <div id="index"> + {+publish.classesIndex+} + </div> + + <div id="content"> + {+include("static/preludeIntro.html")+} + <!-- <h1 class="classTitle">Class Index</h1> --> + <!-- <for each="thisClass" in="data"> --> + <!-- <div> --> + <!-- <h2>{+(new Link().toSymbol(thisClass.alias))+}</h2> --> + <!-- {+resolveLinks(summarize(thisClass.classDesc))+} --> + <!-- </div> --> + <!-- <hr /> --> + <!-- </for> --> + </div> + <div class="fineprint" style="clear:both"> + <if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if> + Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+} + </div> + </body> +</html> diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/publish.js b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/publish.js new file mode 100644 index 0000000..42300f4 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/publish.js @@ -0,0 +1,201 @@ +/** Called automatically by JsDoc Toolkit. */ +function publish(symbolSet) { + publish.conf = { // trailing slash expected for dirs + ext: ".html", + outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/", + templatesDir: JSDOC.opt.t || SYS.pwd+"../templates/jsdoc/", + symbolsDir: "symbols/", + srcDir: "symbols/src/" + }; + + // is source output is suppressed, just display the links to the source file + if (JSDOC.opt.s && defined(Link) && Link.prototype._makeSrcLink) { + Link.prototype._makeSrcLink = function(srcFilePath) { + return "<"+srcFilePath+">"; + } + } + + // create the folders and subfolders to hold the output + IO.mkPath((publish.conf.outDir+"symbols/src").split("/")); + + // used to allow Link to check the details of things being linked to + Link.symbolSet = symbolSet; + + // create the required templates + try { + var classTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"class.tmpl"); + var classesTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allclasses.tmpl"); + } + catch(e) { + print("Couldn't create the required templates: "+e); + quit(); + } + + // some ustility filters + function hasNoParent($) {return ($.memberOf == "")} + function isaFile($) {return ($.is("FILE"))} + function isaClass($) {return ($.is("CONSTRUCTOR") || $.isNamespace)} + + // get an array version of the symbolset, useful for filtering + var symbols = symbolSet.toArray(); + + // create the hilited source code files + var files = JSDOC.opt.srcFiles; + for (var i = 0, l = files.length; i < l; i++) { + var file = files[i]; + var srcDir = publish.conf.outDir + "symbols/src/"; + makeSrcFile(file, srcDir); + } + + // get a list of all the classes in the symbolset + var classes = symbols.filter(isaClass).sort(makeSortby("alias")); + + // create a filemap in which outfiles must be to be named uniquely, ignoring case + if (JSDOC.opt.u) { + var filemapCounts = {}; + Link.filemap = {}; + for (var i = 0, l = classes.length; i < l; i++) { + var lcAlias = classes[i].alias.toLowerCase(); + + if (!filemapCounts[lcAlias]) filemapCounts[lcAlias] = 1; + else filemapCounts[lcAlias]++; + + Link.filemap[classes[i].alias] = + (filemapCounts[lcAlias] > 1)? + lcAlias+"_"+filemapCounts[lcAlias] : lcAlias; + } + } + + // create a class index, displayed in the left-hand column of every class page + Link.base = "../"; + publish.classesIndex = classesTemplate.process(classes); // kept in memory + + // create each of the class pages + for (var i = 0, l = classes.length; i < l; i++) { + var symbol = classes[i]; + + symbol.events = symbol.getEvents(); // 1 order matters + symbol.methods = symbol.getMethods(); // 2 + + Link.currentSymbol= symbol; + var output = ""; + output = classTemplate.process(symbol); + + IO.saveFile(publish.conf.outDir+"symbols/", ((JSDOC.opt.u)? Link.filemap[symbol.alias] : symbol.alias) + publish.conf.ext, output); + } + + // regenerate the index with different relative links, used in the index pages + Link.base = ""; + publish.classesIndex = classesTemplate.process(classes); + + // create the class index page + try { + var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"index.tmpl"); + } + catch(e) { print(e.message); quit(); } + + var classesIndex = classesindexTemplate.process(classes); + IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex); + classesindexTemplate = classesIndex = classes = null; + + // create the file index page + try { + var fileindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allfiles.tmpl"); + } + catch(e) { print(e.message); quit(); } + + var documentedFiles = symbols.filter(isaFile); // files that have file-level docs + var allFiles = []; // not all files have file-level docs, but we need to list every one + + for (var i = 0; i < files.length; i++) { + allFiles.push(new JSDOC.Symbol(files[i], [], "FILE", new JSDOC.DocComment("/** */"))); + } + + for (var i = 0; i < documentedFiles.length; i++) { + var offset = files.indexOf(documentedFiles[i].alias); + allFiles[offset] = documentedFiles[i]; + } + + allFiles = allFiles.sort(makeSortby("name")); + + // output the file index page + var filesIndex = fileindexTemplate.process(allFiles); + IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex); + fileindexTemplate = filesIndex = files = null; +} + + +/** Just the first sentence (up to a full stop). Should not break on dotted variable names. */ +function summarize(desc) { + if (typeof desc != "undefined") + return desc.match(/([\w\W]+?\.)[^a-z0-9_$]/i)? RegExp.$1 : desc; +} + +/** Make a symbol sorter by some attribute. */ +function makeSortby(attribute) { + return function(a, b) { + if (a[attribute] != undefined && b[attribute] != undefined) { + a = a[attribute].toLowerCase(); + b = b[attribute].toLowerCase(); + if (a < b) return -1; + if (a > b) return 1; + return 0; + } + } +} + +/** Pull in the contents of an external file at the given path. */ +function include(path) { + var path = publish.conf.templatesDir+path; + return IO.readFile(path); +} + +/** Turn a raw source file into a code-hilited page in the docs. */ +function makeSrcFile(path, srcDir, name) { + if (JSDOC.opt.s) return; + + if (!name) { + name = path.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_"); + name = name.replace(/\:/g, "_"); + } + + var src = {path: path, name:name, charset: IO.encoding, hilited: ""}; + + if (defined(JSDOC.PluginManager)) { + JSDOC.PluginManager.run("onPublishSrc", src); + } + + if (src.hilited) { + IO.saveFile(srcDir, name+publish.conf.ext, src.hilited); + } +} + +/** Build output for displaying function parameters. */ +function makeSignature(params) { + if (!params) return "()"; + var signature = "(" + + + params.filter( + function($) { + return $.name.indexOf(".") == -1; // don't show config params in signature + } + ).map( + function($) { + return $.name; + } + ).join(", ") + + + ")"; + return signature; +} + +/** Find symbol {@link ...} strings in text and turn into html links */ +function resolveLinks(str, from) { + str = str.replace(/\{@link ([^} ]+) ?\}/gi, + function(match, symbolName) { + return new Link().toSymbol(symbolName); + } + ); + + return str; +} diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/.gitignore b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/.gitignore new file mode 100644 index 0000000..2dae318 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/.gitignore @@ -0,0 +1,2 @@ +preludeIntro.html +preludeIntro.css diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/default.css b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/default.css new file mode 100644 index 0000000..97e021e --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/default.css @@ -0,0 +1,162 @@ +/* default.css */ +body +{ + font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif; + width: 800px; +} + +.header +{ + clear: both; + background-color: #ccc; + padding: 8px; +} + +h1 +{ + font-size: 150%; + font-weight: bold; + padding: 0; + margin: 1em 0 0 .3em; +} + +hr +{ + border: none 0; + border-top: 1px solid #7F8FB1; + height: 1px; +} + +pre.code +{ + display: block; + padding: 8px; + border: 1px dashed #ccc; +} + +#index +{ + margin-top: 24px; + float: left; + width: 160px; + position: absolute; + left: 8px; + background-color: #F3F3F3; + padding: 8px; +} + +#content +{ + margin-left: 190px; + width: 600px; +} + +.classList +{ + list-style-type: none; + padding: 0; + margin: 0 0 0 8px; + font-family: arial, sans-serif; + font-size: 1em; + overflow: auto; +} + +.classList li +{ + padding: 0; + margin: 0 0 8px 0; +} + +.summaryTable { width: 100%; } + +h1.classTitle +{ + font-size:170%; + line-height:130%; +} + +h2 { font-size: 110%; } +caption, div.sectionTitle +{ + background-color: #7F8FB1; + color: #fff; + font-size:130%; + text-align: left; + padding: 2px 6px 2px 6px; + border: 1px #7F8FB1 solid; +} + +div.sectionTitle { margin-bottom: 8px; } +.summaryTable thead { display: none; } + +.summaryTable td +{ + vertical-align: top; + padding: 4px; + border-bottom: 1px #7F8FB1 solid; + border-right: 1px #7F8FB1 solid; +} + +/*col#summaryAttributes {}*/ +.summaryTable td.attributes +{ + border-left: 1px #7F8FB1 solid; + width: 140px; + text-align: right; +} + +td.attributes, .fixedFont +{ + line-height: 15px; + color: #002EBE; + font-family: "Courier New",Courier,monospace; + font-size: 13px; +} + +.summaryTable td.nameDescription +{ + text-align: left; + font-size: 13px; + line-height: 15px; +} + +.summaryTable td.nameDescription, .description +{ + line-height: 15px; + padding: 4px; + padding-left: 4px; +} + +.summaryTable { margin-bottom: 8px; } + +ul.inheritsList +{ + list-style: square; + margin-left: 20px; + padding-left: 0; +} + +.detailList { + margin-left: 20px; + line-height: 15px; +} +.detailList dt { margin-left: 20px; } + +.detailList .heading +{ + font-weight: bold; + padding-bottom: 6px; + margin-left: 0; +} + +.light, td.attributes, .light a:link, .light a:visited +{ + color: #777; + font-style: italic; +} + +.fineprint +{ + text-align: right; + font-size: 10px; +}
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/header.html b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/header.html new file mode 100644 index 0000000..7b81904 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/header.html @@ -0,0 +1,2 @@ +<div id="header"> +</div> diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/index.html b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/index.html new file mode 100644 index 0000000..661f6f6 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/index.html @@ -0,0 +1,19 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>Generated Javascript Documentation</title> +</head> +<frameset cols="20%,80%"> + <frame src="allclasses-frame.html" name="packageFrame" /> + <frame src="splash.html" name="classFrame" /> + <noframes> + <body> + <p> + This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. + </p> + </body> + </noframes> +</frameset> +</html>
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/preludeIntro.md b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/preludeIntro.md new file mode 100644 index 0000000..d3e6d38 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/static/preludeIntro.md @@ -0,0 +1,86 @@ +# The FiveUI Prelude + +The FiveUI Prelude provides a basic set of utilities to assist with +writing rules and rule sets for the FiveUI browser extension. + +The following format is used to describe Rules and RuleSets for the +FiveUI tool. + +FiveUI uses a JSON-like representation for RuleSets and Rules, as follows: + + +## Rule Set Syntax + +Rule Sets take the form of: + +```javascript +{ + /** + * A short descriptive name for the Rule Set. + * + * @type {!string} + */ + 'name': 'Short Rule Set Name', + + /** + * A detailed description of the Rule Set, potentially + * including links back to the original source. + * + * @type {!string} + */ + 'description': 'Rule Set description ' + + 'Multiple lines can be used to describe the Rule Set', + /** + * A list of rules to load and evaluate on pages + * that are matched to this RuleSet. + * + * @type Array.<Rule> + */ + 'rules': [] +}; +``` + +## Rule Syntax + +Individual Rules are created with the following format:</p> + +```javascript +{ + /** + * A short descriptive name for the Rule. + * + * @type {!string} + */ + 'name': 'Short Rule name', + + /** + * A detailed description of the RuleSet, potentially + * including links back to the original source. + * + * @type {!string} + */ + 'description': 'Description of the underlying guideline that ' + + 'this rule enforces.', + + /** + * A Javascript function that represents a guideline. + * + * The rule function should invoke `report(descr, node)` when the + * guideline is violated. + * + * The rule function has access to the FiveUI prelude and jQuery. + */ + 'rule': function() { + fiveui.query('selector').each(function(idx, elt) { + if(condition(elt)) { + report('Guideline was violated', elt); + } + }); + } +}; +``` + +In the context of the function passed as the **rule** field, the **this** object +will point to an anonymous object that contains the other fields of the rule +,**name** and **description**. In addition to the fields of the rule, there is +a field named **ruleSet**, which is a reference to the enclosing `Rule Set`. diff --git a/tools/jsdoc-toolkit-2.4.0/templates/fiveui/symbol.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/symbol.tmpl new file mode 100644 index 0000000..f8f4bd1 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/fiveui/symbol.tmpl @@ -0,0 +1,35 @@ +<symbol alias="{+data.alias+}"> + <name>{+data.name+}</name> + <memberOf>{+data.memberOf+}</memberOf> + <isStatic>{+data.isStatic+}</isStatic> + <isa>{+data.isa+}</isa> + <desc>{+data.desc+}</desc> + <classDesc>{+data.classDesc+}</classDesc> + + <methods><for each="method" in="data.methods"> + <method> + <name>{+method.name+}</name> + <memberOf>{+method.memberOf+}</memberOf> + <isStatic>{+method.isStatic+}</isStatic> + <desc>{+method.desc+}</desc> + <params><for each="param" in="method.params"> + <param> + <type>{+param.type+}</type> + <name>{+param.name+}</name> + <desc>{+param.desc+}</desc> + <defaultValue>{+param.defaultValue+}</defaultValue> + </param></for> + </params> + </method></for> + </methods> + + <properties><for each="property" in="data.properties"> + <property> + <name>{+property.name+}</name> + <memberOf>{+property.memberOf+}</memberOf> + <isStatic>{+property.isStatic+}</isStatic> + <desc>{+property.desc+}</desc> + <type>{+property.type+}</type> + </property></for> + </properties> +</symbol> diff --git a/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/allclasses.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/allclasses.tmpl new file mode 100644 index 0000000..32f4358 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/allclasses.tmpl @@ -0,0 +1,17 @@ +<div align="center">{+new Link().toFile("index.html").withText("Class Index")+} +| {+new Link().toFile("files.html").withText("File Index")+}</div> +<hr /> +<h2>Classes</h2> +<ul class="classList"> + <for each="thisClass" in="data"> + <li>{! + if (thisClass.alias == "_global_") { + output += "<i>"+new Link().toClass(thisClass.alias)+"</i>"; + } + else { + output += new Link().toClass(thisClass.alias); + } + !}</li> + </for> +</ul> +<hr />
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/allfiles.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/allfiles.tmpl new file mode 100644 index 0000000..4c7de1c --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/allfiles.tmpl @@ -0,0 +1,56 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" /> + {! Link.base = ""; /* all generated links will be relative to this */ !} + <title>JsDoc Reference - File Index</title> + <meta name="generator" content="JsDoc Toolkit" /> + + <style type="text/css"> + {+include("static/default.css")+} + </style> + </head> + + <body> + {+include("static/header.html")+} + + <div id="index"> + {+publish.classesIndex+} + </div> + + <div id="content"> + <h1 class="classTitle">File Index</h1> + + <for each="item" in="data"> + <div> + <h2>{+new Link().toSrc(item.alias).withText(item.name)+}</h2> + <if test="item.desc">{+resolveLinks(item.desc)+}</if> + <dl> + <if test="item.author"> + <dt class="heading">Author:</dt> + <dd>{+item.author+}</dd> + </if> + <if test="item.version"> + <dt class="heading">Version:</dt> + <dd>{+item.version+}</dd> + </if> + {! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !} + <if test="locations.length"> + <dt class="heading">Location:</dt> + <for each="location" in="locations"> + <dd><a href="{+location+}">{+location+}</a></dd> + </for> + </if> + </dl> + </div> + <hr /> + </for> + + </div> + <div class="fineprint" style="clear:both"> + <if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if> + Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+} + </div> + </body> +</html>
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/class.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/class.tmpl new file mode 100644 index 0000000..1b32e4a --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/class.tmpl @@ -0,0 +1,649 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" /> + <meta name="generator" content="JsDoc Toolkit" /> + {! Link.base = "../"; /* all generated links will be relative to this */ !} + <title>JsDoc Reference - {+data.alias+}</title> + + <style type="text/css"> + {+include("static/default.css")+} + </style> + </head> + + <body> +<!-- ============================== header ================================= --> + <!-- begin static/header.html --> + {+include("static/header.html")+} + <!-- end static/header.html --> + +<!-- ============================== classes index ============================ --> + <div id="index"> + <!-- begin publish.classesIndex --> + {+publish.classesIndex+} + <!-- end publish.classesIndex --> + </div> + + <div id="content"> +<!-- ============================== class title ============================ --> + <h1 class="classTitle"> + {! + var classType = ""; + + if (data.isBuiltin()) { + classType += "Built-In "; + } + + if (data.isNamespace) { + if (data.is('FUNCTION')) { + classType += "Function "; + } + classType += "Namespace "; + } + else { + classType += "Class "; + } + !} + {+classType+}{+data.alias+} + </h1> + +<!-- ============================== class summary ========================== --> + <p class="description"> + <if test="data.version"><br />Version + {+ data.version +}.<br /> + </if> + <if test="data.augments.length"><br />Extends + {+ + data.augments + .sort() + .map( + function($) { return new Link().toSymbol($); } + ) + .join(", ") + +}.<br /> + </if> + + {+resolveLinks(data.classDesc)+} + + <if test="!data.isBuiltin()">{# isn't defined in any file #} + <br /><i>Defined in: </i> {+new Link().toSrc(data.srcFile)+}. + </if> + </p> + +<!-- ============================== constructor summary ==================== --> + <if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))"> + <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class {+data.alias+}."> + <caption>{+classType+}Summary</caption> + <thead> + <tr> + <th scope="col">Constructor Attributes</th> + <th scope="col">Constructor Name and Description</th> + </tr> + </thead> + <tbody> + <tr> + <td class="attributes">{! + if (data.isPrivate) output += "<private> "; + if (data.isInner) output += "<inner> "; + !} </td> + <td class="nameDescription" {!if (data.comment.getTag("hilited").length){output += 'style="color: red"'}!}> + <div class="fixedFont"> + <b>{+ new Link().toSymbol(data.alias).inner('constructor')+}</b><if test="classType != 'Namespace '">{+ makeSignature(data.params) +}</if> + </div> + <div class="description">{+resolveLinks(summarize(data.desc))+}</div> + </td> + </tr> + </tbody> + </table> + </if> + +<!-- ============================== properties summary ===================== --> + <if test="data.properties.length"> + {! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} + <if test="ownProperties.length"> + <table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class {+data.alias+}."> + <caption>Field Summary</caption> + <thead> + <tr> + <th scope="col">Field Attributes</th> + <th scope="col">Field Name and Description</th> + </tr> + </thead> + <tbody> + <for each="member" in="ownProperties"> + <tr> + <td class="attributes">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + if (member.isConstant) output += "<constant> "; + !} </td> + <td class="nameDescription"> + <div class="fixedFont"> + <if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b> + </div> + <div class="description">{+resolveLinks(summarize(member.desc))+}</div> + </td> + </tr> + </for> + </tbody> + </table> + </if> + + <if test="data.inheritsFrom.length"> + <dl class="inheritsList"> + {! + var borrowedMembers = data.properties.filter(function($) {return $.memberOf != data.alias}); + + var contributers = []; + borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); + for (var i = 0, l = contributers.length; i < l; i++) { + output += + "<dt>Fields borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>" + + + "<dd>" + + borrowedMembers + .filter( + function($) { return $.memberOf == contributers[i] } + ) + .sort(makeSortby("name")) + .map( + function($) { return new Link().toSymbol($.alias).withText($.name) } + ) + .join(", ") + + + "</dd>"; + } + !} + </dl> + </if> + </if> + +<!-- ============================== methods summary ======================== --> + <if test="data.methods.length"> + {! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} + <if test="ownMethods.length"> + <table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class {+data.alias+}."> + <caption>Method Summary</caption> + <thead> + <tr> + <th scope="col">Method Attributes</th> + <th scope="col">Method Name and Description</th> + </tr> + </thead> + <tbody> + <for each="member" in="ownMethods"> + <tr> + <td class="attributes">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + !} </td> + <td class="nameDescription"> + <div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name.replace(/\^\d+$/, ''))+}</b>{+makeSignature(member.params)+} + </div> + <div class="description">{+resolveLinks(summarize(member.desc))+}</div> + </td> + </tr> + </for> + </tbody> + </table> + </if> + + <if test="data.inheritsFrom.length"> + <dl class="inheritsList"> + {! + var borrowedMembers = data.methods.filter(function($) {return $.memberOf != data.alias}); + var contributers = []; + borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); + for (var i = 0, l = contributers.length; i < l; i++) { + output += + "<dt>Methods borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>" + + + "<dd>" + + borrowedMembers + .filter( + function($) { return $.memberOf == contributers[i] } + ) + .sort(makeSortby("name")) + .map( + function($) { return new Link().toSymbol($.alias).withText($.name) } + ) + .join(", ") + + + "</dd>"; + } + + !} + </dl> + </if> + </if> +<!-- ============================== events summary ======================== --> + <if test="data.events.length"> + {! var ownEvents = data.events.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} + <if test="ownEvents.length"> + <table class="summaryTable" cellspacing="0" summary="A summary of the events documented in the class {+data.alias+}."> + <caption>Event Summary</caption> + <thead> + <tr> + <th scope="col">Event Attributes</th> + <th scope="col">Event Name and Description</th> + </tr> + </thead> + <tbody> + <for each="member" in="ownEvents"> + <tr> + <td class="attributes">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + !} </td> + <td class="nameDescription"> + <div class="fixedFont"><if test="member.isStatic && member.memberOf != '_global_'">{+member.memberOf+}.</if><b>{+new Link().toSymbol(member.alias).withText(member.name)+}</b>{+makeSignature(member.params)+} + </div> + <div class="description">{+resolveLinks(summarize(member.desc))+}</div> + </td> + </tr> + </for> + </tbody> + </table> + </if> + + <if test="data.inheritsFrom.length"> + <dl class="inheritsList"> + {! + var borrowedMembers = data.events.filter(function($) {return $.memberOf != data.alias}); + var contributers = []; + borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); + for (var i = 0, l = contributers.length; i < l; i++) { + output += + "<dt>Events borrowed from class "+new Link().toSymbol(contributers[i])+": </dt>" + + + "<dd>" + + borrowedMembers + .filter( + function($) { return $.memberOf == contributers[i] } + ) + .sort(makeSortby("name")) + .map( + function($) { return new Link().toSymbol($.alias).withText($.name) } + ) + .join(", ") + + + "</dd>"; + } + + !} + </dl> + </if> + </if> + +<!-- ============================== constructor details ==================== --> + <if test="!data.isBuiltin() && (data.isNamespace || data.is('CONSTRUCTOR'))"> + <div class="details"><a name="constructor"> </a> + <div class="sectionTitle"> + {+classType+}Detail + </div> + + <div class="fixedFont">{! + if (data.isPrivate) output += "<private> "; + if (data.isInner) output += "<inner> "; + !} + <b>{+ data.alias +}</b><if test="classType != 'Namespace '">{+ makeSignature(data.params) +}</if> + </div> + + <div class="description"> + {+resolveLinks(data.desc)+} + <if test="data.author"><br /><i>Author: </i>{+data.author+}.</if> + </div> + + <if test="data.example.length"> + <for each="example" in="data.example"> + <pre class="code">{+example+}</pre> + </for> + </if> + + + <if test="data.params.length"> + <dl class="detailList"> + <dt class="heading">Parameters:</dt> + <for each="item" in="data.params"> + <dt> + {+((item.type)?""+("<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type)+"}</span> ")) : "")+} <b>{+item.name+}</b> + <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if> + </dt> + <dd>{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="data.deprecated"> + <dl class="detailList"> + <dt class="heading">Deprecated:</dt> + <dt> + {+resolveLinks(data.deprecated)+} + </dt> + </dl> + </if> + <if test="data.since"> + <dl class="detailList"> + <dt class="heading">Since:</dt> + <dd>{+ data.since +}</dd> + </dl> + </if> + <if test="data.exceptions.length"> + <dl class="detailList"> + <dt class="heading">Throws:</dt> + <for each="item" in="data.exceptions"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b> + </dt> + <dd>{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="data.returns.length"> + <dl class="detailList"> + <dt class="heading">Returns:</dt> + <for each="item" in="data.returns"> + <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="data.requires.length"> + <dl class="detailList"> + <dt class="heading">Requires:</dt> + <for each="item" in="data.requires"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + <if test="data.see.length"> + <dl class="detailList"> + <dt class="heading">See:</dt> + <for each="item" in="data.see"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + + </div> + </if> + +<!-- ============================== field details ========================== --> + <if test="defined(ownProperties) && ownProperties.length"> + <div class="sectionTitle"> + Field Detail + </div> + <for each="member" in="ownProperties"> + <a name="{+Link.symbolNameToLinkName(member)+}"> </a> + <div class="fixedFont">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + if (member.isConstant) output += "<constant> "; + !} + + <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if> + <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b> + + </div> + <div class="description"> + {+resolveLinks(member.desc)+} + <if test="member.srcFile != data.srcFile"> + <br /> + <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}. + </if> + <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if> + </div> + + <if test="member.example.length"> + <for each="example" in="member.example"> + <pre class="code">{+example+}</pre> + </for> + </if> + + <if test="member.deprecated"> + <dl class="detailList"> + <dt class="heading">Deprecated:</dt> + <dt> + {+ resolveLinks(member.deprecated) +} + </dt> + </dl> + </if> + <if test="member.since"> + <dl class="detailList"> + <dt class="heading">Since:</dt> + <dd>{+ member.since +}</dd> + </dl> + </if> + <if test="member.see.length"> + <dl class="detailList"> + <dt class="heading">See:</dt> + <for each="item" in="member.see"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + <if test="member.defaultValue"> + <dl class="detailList"> + <dt class="heading">Default Value:</dt> + <dd> + {+resolveLinks(member.defaultValue)+} + </dd> + </dl> + </if> + + <if test="!$member_last"><hr /></if> + </for> + </if> + +<!-- ============================== method details ========================= --> + <if test="defined(ownMethods) && ownMethods.length"> + <div class="sectionTitle"> + Method Detail + </div> + <for each="member" in="ownMethods"> + <a name="{+Link.symbolNameToLinkName(member)+}"> </a> + <div class="fixedFont">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + !} + + <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if> + <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name.replace(/\^\d+$/, '')+}</b>{+makeSignature(member.params)+} + + </div> + <div class="description"> + {+resolveLinks(member.desc)+} + <if test="member.srcFile != data.srcFile"> + <br /> + <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}. + </if> + <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if> + </div> + + <if test="member.example.length"> + <for each="example" in="member.example"> + <pre class="code">{+example+}</pre> + </for> + </if> + + <if test="member.params.length"> + <dl class="detailList"> + <dt class="heading">Parameters:</dt> + <for each="item" in="member.params"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b> + <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if> + </dt> + <dd>{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="member.deprecated"> + <dl class="detailList"> + <dt class="heading">Deprecated:</dt> + <dt> + {+ resolveLinks(member.deprecated) +} + </dt> + </dl> + </if> + <if test="member.since"> + <dl class="detailList"> + <dt class="heading">Since:</dt> + <dd>{+ member.since +}</dd> + </dl> + </dl> + </if> + <if test="member.exceptions.length"> + <dl class="detailList"> + <dt class="heading">Throws:</dt> + <for each="item" in="member.exceptions"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b> + </dt> + <dd>{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="member.returns.length"> + <dl class="detailList"> + <dt class="heading">Returns:</dt> + <for each="item" in="member.returns"> + <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="member.requires.length"> + <dl class="detailList"> + <dt class="heading">Requires:</dt> + <for each="item" in="member.requires"> + <dd>{+ resolveLinks(item) +}</dd> + </for> + </dl> + </if> + <if test="member.see.length"> + <dl class="detailList"> + <dt class="heading">See:</dt> + <for each="item" in="member.see"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + + <if test="!$member_last"><hr /></if> + </for> + </if> + +<!-- ============================== event details ========================= --> + <if test="defined(ownEvents) && ownEvents.length"> + <div class="sectionTitle"> + Event Detail + </div> + <for each="member" in="ownEvents"> + <a name="{+Link.symbolNameToLinkName(member)+}"> </a> + <div class="fixedFont">{! + if (member.isPrivate) output += "<private> "; + if (member.isInner) output += "<inner> "; + if (member.isStatic) output += "<static> "; + !} + + <if test="member.type"><span class="light">{{+new Link().toSymbol(member.type)+}}</span></if> + <if test="member.isStatic && member.memberOf != '_global_'"><span class="light">{+member.memberOf+}.</span></if><b>{+member.name+}</b>{+makeSignature(member.params)+} + + </div> + <div class="description"> + {+resolveLinks(member.desc)+} + <if test="member.srcFile != data.srcFile"> + <br /> + <i>Defined in: </i> {+new Link().toSrc(member.srcFile)+}. + </if> + <if test="member.author"><br /><i>Author: </i>{+member.author+}.</if> + </div> + + <if test="member.example.length"> + <for each="example" in="member.example"> + <pre class="code">{+example+}</pre> + </for> + </if> + + <if test="member.params.length"> + <dl class="detailList"> + <dt class="heading">Parameters:</dt> + <for each="item" in="member.params"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}<b>{+item.name+}</b> + <if test="item.isOptional"><i>Optional<if test="item.defaultValue">, Default: {+item.defaultValue+}</if></i></if> + </dt> + <dd>{+ resolveLinks(item.desc) +}</dd> + </for> + </dl> + </if> + <if test="member.deprecated"> + <dl class="detailList"> + <dt class="heading">Deprecated:</dt> + <dt> + {+ resolveLinks(member.deprecated) +} + </dt> + </dl> + </if> + <if test="member.since"> + <dl class="detailList"> + <dt class="heading">Since:</dt> + <dd>{+ member.since +}</dd> + </dl> + </dl> + </if> + <if test="member.exceptions.length"> + <dl class="detailList"> + <dt class="heading">Throws:</dt> + <for each="item" in="member.exceptions"> + <dt> + {+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+} <b>{+item.name+}</b> + </dt> + <dd>{+ resolveLinks(item.desc) +}</dd> + </for> + </dl> + </if> + <if test="member.returns.length"> + <dl class="detailList"> + <dt class="heading">Returns:</dt> + <for each="item" in="member.returns"> + <dd>{+((item.type)?"<span class=\"light fixedFont\">{"+(new Link().toSymbol(item.type))+"}</span> " : "")+}{+resolveLinks(item.desc)+}</dd> + </for> + </dl> + </if> + <if test="member.requires.length"> + <dl class="detailList"> + <dt class="heading">Requires:</dt> + <for each="item" in="member.requires"> + <dd>{+ resolveLinks(item) +}</dd> + </for> + </dl> + </if> + <if test="member.see.length"> + <dl class="detailList"> + <dt class="heading">See:</dt> + <for each="item" in="member.see"> + <dd>{+ new Link().toSymbol(item) +}</dd> + </for> + </dl> + </if> + + <if test="!$member_last"><hr /></if> + </for> + </if> + + <hr /> + </div> + + +<!-- ============================== footer ================================= --> + <div class="fineprint" style="clear:both"> + <if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if> + Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+} + </div> + </body> +</html> diff --git a/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/index.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/index.tmpl new file mode 100644 index 0000000..a5dc115 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/index.tmpl @@ -0,0 +1,39 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> + <head> + <meta http-equiv="content-type" content="text/html; charset={+IO.encoding+}" /> + + <title>JsDoc Reference - Index</title> + <meta name="generator" content="JsDoc Toolkit" /> + + <style type="text/css"> + {+include("static/default.css")+} + </style> + </head> + + <body> + {+include("static/header.html")+} + + <div id="index"> + {+publish.classesIndex+} + </div> + + <div id="content"> + <h1 class="classTitle">Class Index</h1> + + <for each="thisClass" in="data"> + <div> + <h2>{+(new Link().toSymbol(thisClass.alias))+}</h2> + {+resolveLinks(summarize(thisClass.classDesc))+} + </div> + <hr /> + </for> + + </div> + <div class="fineprint" style="clear:both"> + <if test="JSDOC.opt.D.copyright">©{+JSDOC.opt.D.copyright+}<br /></if> + Documentation generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blankt">JsDoc Toolkit</a> {+JSDOC.VERSION+} on {+new Date()+} + </div> + </body> +</html>
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/publish.js b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/publish.js new file mode 100644 index 0000000..42300f4 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/publish.js @@ -0,0 +1,201 @@ +/** Called automatically by JsDoc Toolkit. */ +function publish(symbolSet) { + publish.conf = { // trailing slash expected for dirs + ext: ".html", + outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/", + templatesDir: JSDOC.opt.t || SYS.pwd+"../templates/jsdoc/", + symbolsDir: "symbols/", + srcDir: "symbols/src/" + }; + + // is source output is suppressed, just display the links to the source file + if (JSDOC.opt.s && defined(Link) && Link.prototype._makeSrcLink) { + Link.prototype._makeSrcLink = function(srcFilePath) { + return "<"+srcFilePath+">"; + } + } + + // create the folders and subfolders to hold the output + IO.mkPath((publish.conf.outDir+"symbols/src").split("/")); + + // used to allow Link to check the details of things being linked to + Link.symbolSet = symbolSet; + + // create the required templates + try { + var classTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"class.tmpl"); + var classesTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allclasses.tmpl"); + } + catch(e) { + print("Couldn't create the required templates: "+e); + quit(); + } + + // some ustility filters + function hasNoParent($) {return ($.memberOf == "")} + function isaFile($) {return ($.is("FILE"))} + function isaClass($) {return ($.is("CONSTRUCTOR") || $.isNamespace)} + + // get an array version of the symbolset, useful for filtering + var symbols = symbolSet.toArray(); + + // create the hilited source code files + var files = JSDOC.opt.srcFiles; + for (var i = 0, l = files.length; i < l; i++) { + var file = files[i]; + var srcDir = publish.conf.outDir + "symbols/src/"; + makeSrcFile(file, srcDir); + } + + // get a list of all the classes in the symbolset + var classes = symbols.filter(isaClass).sort(makeSortby("alias")); + + // create a filemap in which outfiles must be to be named uniquely, ignoring case + if (JSDOC.opt.u) { + var filemapCounts = {}; + Link.filemap = {}; + for (var i = 0, l = classes.length; i < l; i++) { + var lcAlias = classes[i].alias.toLowerCase(); + + if (!filemapCounts[lcAlias]) filemapCounts[lcAlias] = 1; + else filemapCounts[lcAlias]++; + + Link.filemap[classes[i].alias] = + (filemapCounts[lcAlias] > 1)? + lcAlias+"_"+filemapCounts[lcAlias] : lcAlias; + } + } + + // create a class index, displayed in the left-hand column of every class page + Link.base = "../"; + publish.classesIndex = classesTemplate.process(classes); // kept in memory + + // create each of the class pages + for (var i = 0, l = classes.length; i < l; i++) { + var symbol = classes[i]; + + symbol.events = symbol.getEvents(); // 1 order matters + symbol.methods = symbol.getMethods(); // 2 + + Link.currentSymbol= symbol; + var output = ""; + output = classTemplate.process(symbol); + + IO.saveFile(publish.conf.outDir+"symbols/", ((JSDOC.opt.u)? Link.filemap[symbol.alias] : symbol.alias) + publish.conf.ext, output); + } + + // regenerate the index with different relative links, used in the index pages + Link.base = ""; + publish.classesIndex = classesTemplate.process(classes); + + // create the class index page + try { + var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"index.tmpl"); + } + catch(e) { print(e.message); quit(); } + + var classesIndex = classesindexTemplate.process(classes); + IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex); + classesindexTemplate = classesIndex = classes = null; + + // create the file index page + try { + var fileindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allfiles.tmpl"); + } + catch(e) { print(e.message); quit(); } + + var documentedFiles = symbols.filter(isaFile); // files that have file-level docs + var allFiles = []; // not all files have file-level docs, but we need to list every one + + for (var i = 0; i < files.length; i++) { + allFiles.push(new JSDOC.Symbol(files[i], [], "FILE", new JSDOC.DocComment("/** */"))); + } + + for (var i = 0; i < documentedFiles.length; i++) { + var offset = files.indexOf(documentedFiles[i].alias); + allFiles[offset] = documentedFiles[i]; + } + + allFiles = allFiles.sort(makeSortby("name")); + + // output the file index page + var filesIndex = fileindexTemplate.process(allFiles); + IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex); + fileindexTemplate = filesIndex = files = null; +} + + +/** Just the first sentence (up to a full stop). Should not break on dotted variable names. */ +function summarize(desc) { + if (typeof desc != "undefined") + return desc.match(/([\w\W]+?\.)[^a-z0-9_$]/i)? RegExp.$1 : desc; +} + +/** Make a symbol sorter by some attribute. */ +function makeSortby(attribute) { + return function(a, b) { + if (a[attribute] != undefined && b[attribute] != undefined) { + a = a[attribute].toLowerCase(); + b = b[attribute].toLowerCase(); + if (a < b) return -1; + if (a > b) return 1; + return 0; + } + } +} + +/** Pull in the contents of an external file at the given path. */ +function include(path) { + var path = publish.conf.templatesDir+path; + return IO.readFile(path); +} + +/** Turn a raw source file into a code-hilited page in the docs. */ +function makeSrcFile(path, srcDir, name) { + if (JSDOC.opt.s) return; + + if (!name) { + name = path.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_"); + name = name.replace(/\:/g, "_"); + } + + var src = {path: path, name:name, charset: IO.encoding, hilited: ""}; + + if (defined(JSDOC.PluginManager)) { + JSDOC.PluginManager.run("onPublishSrc", src); + } + + if (src.hilited) { + IO.saveFile(srcDir, name+publish.conf.ext, src.hilited); + } +} + +/** Build output for displaying function parameters. */ +function makeSignature(params) { + if (!params) return "()"; + var signature = "(" + + + params.filter( + function($) { + return $.name.indexOf(".") == -1; // don't show config params in signature + } + ).map( + function($) { + return $.name; + } + ).join(", ") + + + ")"; + return signature; +} + +/** Find symbol {@link ...} strings in text and turn into html links */ +function resolveLinks(str, from) { + str = str.replace(/\{@link ([^} ]+) ?\}/gi, + function(match, symbolName) { + return new Link().toSymbol(symbolName); + } + ); + + return str; +} diff --git a/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/static/default.css b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/static/default.css new file mode 100644 index 0000000..97e021e --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/static/default.css @@ -0,0 +1,162 @@ +/* default.css */ +body +{ + font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif; + width: 800px; +} + +.header +{ + clear: both; + background-color: #ccc; + padding: 8px; +} + +h1 +{ + font-size: 150%; + font-weight: bold; + padding: 0; + margin: 1em 0 0 .3em; +} + +hr +{ + border: none 0; + border-top: 1px solid #7F8FB1; + height: 1px; +} + +pre.code +{ + display: block; + padding: 8px; + border: 1px dashed #ccc; +} + +#index +{ + margin-top: 24px; + float: left; + width: 160px; + position: absolute; + left: 8px; + background-color: #F3F3F3; + padding: 8px; +} + +#content +{ + margin-left: 190px; + width: 600px; +} + +.classList +{ + list-style-type: none; + padding: 0; + margin: 0 0 0 8px; + font-family: arial, sans-serif; + font-size: 1em; + overflow: auto; +} + +.classList li +{ + padding: 0; + margin: 0 0 8px 0; +} + +.summaryTable { width: 100%; } + +h1.classTitle +{ + font-size:170%; + line-height:130%; +} + +h2 { font-size: 110%; } +caption, div.sectionTitle +{ + background-color: #7F8FB1; + color: #fff; + font-size:130%; + text-align: left; + padding: 2px 6px 2px 6px; + border: 1px #7F8FB1 solid; +} + +div.sectionTitle { margin-bottom: 8px; } +.summaryTable thead { display: none; } + +.summaryTable td +{ + vertical-align: top; + padding: 4px; + border-bottom: 1px #7F8FB1 solid; + border-right: 1px #7F8FB1 solid; +} + +/*col#summaryAttributes {}*/ +.summaryTable td.attributes +{ + border-left: 1px #7F8FB1 solid; + width: 140px; + text-align: right; +} + +td.attributes, .fixedFont +{ + line-height: 15px; + color: #002EBE; + font-family: "Courier New",Courier,monospace; + font-size: 13px; +} + +.summaryTable td.nameDescription +{ + text-align: left; + font-size: 13px; + line-height: 15px; +} + +.summaryTable td.nameDescription, .description +{ + line-height: 15px; + padding: 4px; + padding-left: 4px; +} + +.summaryTable { margin-bottom: 8px; } + +ul.inheritsList +{ + list-style: square; + margin-left: 20px; + padding-left: 0; +} + +.detailList { + margin-left: 20px; + line-height: 15px; +} +.detailList dt { margin-left: 20px; } + +.detailList .heading +{ + font-weight: bold; + padding-bottom: 6px; + margin-left: 0; +} + +.light, td.attributes, .light a:link, .light a:visited +{ + color: #777; + font-style: italic; +} + +.fineprint +{ + text-align: right; + font-size: 10px; +}
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/static/header.html b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/static/header.html new file mode 100644 index 0000000..353b735 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/static/header.html @@ -0,0 +1,2 @@ +<div id="header"> +</div>
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/static/index.html b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/static/index.html new file mode 100644 index 0000000..661f6f6 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/static/index.html @@ -0,0 +1,19 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <title>Generated Javascript Documentation</title> +</head> +<frameset cols="20%,80%"> + <frame src="allclasses-frame.html" name="packageFrame" /> + <frame src="splash.html" name="classFrame" /> + <noframes> + <body> + <p> + This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. + </p> + </body> + </noframes> +</frameset> +</html>
\ No newline at end of file diff --git a/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/symbol.tmpl b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/symbol.tmpl new file mode 100644 index 0000000..f8f4bd1 --- /dev/null +++ b/tools/jsdoc-toolkit-2.4.0/templates/jsdoc/symbol.tmpl @@ -0,0 +1,35 @@ +<symbol alias="{+data.alias+}"> + <name>{+data.name+}</name> + <memberOf>{+data.memberOf+}</memberOf> + <isStatic>{+data.isStatic+}</isStatic> + <isa>{+data.isa+}</isa> + <desc>{+data.desc+}</desc> + <classDesc>{+data.classDesc+}</classDesc> + + <methods><for each="method" in="data.methods"> + <method> + <name>{+method.name+}</name> + <memberOf>{+method.memberOf+}</memberOf> + <isStatic>{+method.isStatic+}</isStatic> + <desc>{+method.desc+}</desc> + <params><for each="param" in="method.params"> + <param> + <type>{+param.type+}</type> + <name>{+param.name+}</name> + <desc>{+param.desc+}</desc> + <defaultValue>{+param.defaultValue+}</defaultValue> + </param></for> + </params> + </method></for> + </methods> + + <properties><for each="property" in="data.properties"> + <property> + <name>{+property.name+}</name> + <memberOf>{+property.memberOf+}</memberOf> + <isStatic>{+property.isStatic+}</isStatic> + <desc>{+property.desc+}</desc> + <type>{+property.type+}</type> + </property></for> + </properties> +</symbol> |