diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-02 16:05:50 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-02 16:05:50 +0000 |
commit | 4ce1527a930f211c3e0442a625de3351f1b1a40a (patch) | |
tree | 502d2b4968c5d20682addda3d26020b36d3dfd2c /chrome/common/extensions/docs/template | |
parent | 8ca37f412b605824cdb6917b1f5bdc17e6319d1f (diff) | |
download | chromium_src-4ce1527a930f211c3e0442a625de3351f1b1a40a.zip chromium_src-4ce1527a930f211c3e0442a625de3351f1b1a40a.tar.gz chromium_src-4ce1527a930f211c3e0442a625de3351f1b1a40a.tar.bz2 |
Show methods and events for types in table of contents for extension docs.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/8380008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108304 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/docs/template')
-rw-r--r-- | chrome/common/extensions/docs/template/api_template.html | 98 |
1 files changed, 55 insertions, 43 deletions
diff --git a/chrome/common/extensions/docs/template/api_template.html b/chrome/common/extensions/docs/template/api_template.html index 79f494c..c343d66 100644 --- a/chrome/common/extensions/docs/template/api_template.html +++ b/chrome/common/extensions/docs/template/api_template.html @@ -95,6 +95,56 @@ </div> </dl> </div> + + <!-- Individual subsections from the table of contents --> + <ol> + <li id="propertiesTocTemplate" jsdisplay="$this.properties"> + <a href="#properties">Properties</a> + <ol> + <li jsselect="getPropertyListFromObject($this)"> + <a jscontent="name" + jsvalues=".href:'#property-' + name" + href="#property-anchor">propertyName</a> + </li> + </ol> + </li> + <li id="methodsTocTemplate" jsdisplay="functions && functions.length > 0"> + <a jsvalues=".href:'#' + getAnchorName('global', 'methods', $type)">Methods</a> + <ol> + <li jsselect="functions.sort(sortByName)" + jsdisplay="!($this.nodoc)"> + <a jscontent="name" + jsvalues=".href:'#' + getAnchorName('method', name, $type)" + href="#method-anchor">methodName</a> + </li> + </ol> + </li> + <li id="eventsTocTemplate" jsdisplay="events && events.length > 0"> + <a jsvalues=".href:'#' + getAnchorName('global', 'events', $type)">Events</a> + <ol> + <li jsselect="events.sort(sortByName)" + jsdisplay="!($this.nodoc)"> + <a jscontent="name" + jsvalues=".href:'#' + getAnchorName('event', name, $type)" + href="#event-anchor">eventName</a> + </li> + </ol> + </li> + <li id="typesTocTemplate" jsdisplay="types && types.length > 0"> + <a href="#types">Types</a> + <ol> + <li jsselect="types.sort(sortByName)"> + <a jscontent="id" + jsvalues=".href:'#type-' + id" + href="#id-anchor">id</a> + <ol jsvalues="$type:id"> + <div transclude="methodsTocTemplate"></div> + <div transclude="eventsTocTemplate"></div> + </ol> + </li> + </ol> + </li> + </ol> </div> <!-- /SUBTEMPLATES --> <a id="top"></a> @@ -258,51 +308,13 @@ </li> </ol> </li> - <li jsselect="apiDefinition"> + <li jsselect="apiDefinition" jsvalues="$type:''"> <a href="#apiReference" jscontent="'API reference: ' + getModuleName()">API reference</a> <ol> - <li jsdisplay="$this.properties"> - <a href="#properties">Properties</a> - <ol> - <li jsselect="getPropertyListFromObject($this)"> - <a jscontent="name" - jsvalues=".href:'#property-' + name" - href="#property-anchor">propertyName</a> - </li> - </ol> - </li> - <li jsdisplay="functions && functions.length > 0"> - <a jsvalues=".href:'#' + getAnchorName('global', 'methods')">Methods</a> - <ol> - <li jsselect="functions.sort(sortByName)" - jsdisplay="!($this.nodoc)"> - <a jscontent="name" - jsvalues=".href:'#' + getAnchorName('method', name)" - href="#method-anchor">methodName</a> - </li> - </ol> - </li> - <li jsdisplay="events && events.length > 0"> - <a jsvalues=".href:'#' + getAnchorName('global', 'events')">Events</a> - <ol> - <li jsselect="events.sort(sortByName)" - jsdisplay="!($this.nodoc)"> - <a jscontent="name" - jsvalues=".href:'#' + getAnchorName('event', name)" - href="#event-anchor">eventName</a> - </li> - </ol> - </li> - <li jsdisplay="types && types.length > 0"> - <a href="#types">Types</a> - <ol> - <li jsselect="types.sort(sortByName)"> - <a jscontent="id" - jsvalues=".href:'#type-' + id" - href="#id-anchor">id</a> - </li> - </ol> - </li> + <div transclude="propertiesTocTemplate"></div> + <div transclude="methodsTocTemplate"></div> + <div transclude="eventsTocTemplate"></div> + <div transclude="typesTocTemplate"></div> </ol> </li> </ol> |