update Ox.DocPage
This commit is contained in:
parent
49adbe7048
commit
c12c49d4d1
1 changed files with 10 additions and 7 deletions
|
@ -91,10 +91,9 @@ Ox.DocPage = function(options, self) {
|
|||
+ Ox.sanitizeHTML(item.summary)
|
||||
)
|
||||
];
|
||||
[
|
||||
'description', 'usage', 'arguments', 'properties',
|
||||
'events', 'tests', 'source'
|
||||
].forEach(function(section) {
|
||||
['description'].concat(
|
||||
item.order || ['returns', 'arguments', 'properties', 'events']
|
||||
).concat(['tests', 'source']).forEach(function(section) {
|
||||
var className = 'OxLine' + Ox.uid();
|
||||
if (item[section]) {
|
||||
if (section == 'description') {
|
||||
|
@ -152,7 +151,9 @@ Ox.DocPage = function(options, self) {
|
|||
})
|
||||
)
|
||||
.append('<span class="OxSection">' + Ox.toTitleCase(
|
||||
section == 'tests' ? 'examples' : section
|
||||
section == 'returns' ? 'usage'
|
||||
: section == 'tests' ? 'examples'
|
||||
: section
|
||||
) + '</span>')
|
||||
);
|
||||
if (section == 'tests') {
|
||||
|
@ -201,8 +202,10 @@ Ox.DocPage = function(options, self) {
|
|||
);
|
||||
} else {
|
||||
item[section].forEach(function(v) {
|
||||
var name = section == 'usage' ?
|
||||
item.name + v.name + ' </b></code>returns<code> <b>' : null;
|
||||
var name = section == 'returns' ?
|
||||
item.name + v.signature
|
||||
+ ' </b></code>returns<code> <b>'
|
||||
+ (v.name || '') : null;
|
||||
$elements = $elements.concat(
|
||||
Ox.map(getItem(v, level + 1, name), function($element) {
|
||||
return $element.addClass(className);
|
||||
|
|
Loading…
Reference in a new issue