diff --git a/source/Ox.UI/js/Code/DocPage.js b/source/Ox.UI/js/Code/DocPage.js
index 1b2a648f..af19a42f 100644
--- a/source/Ox.UI/js/Code/DocPage.js
+++ b/source/Ox.UI/js/Code/DocPage.js
@@ -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('' + Ox.toTitleCase(
- section == 'tests' ? 'examples' : section
+ section == 'returns' ? 'usage'
+ : section == 'tests' ? 'examples'
+ : section
) + '')
);
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 + ' returns ' : null;
+ var name = section == 'returns' ?
+ item.name + v.signature
+ + '
returns '
+ + (v.name || '') : null;
$elements = $elements.concat(
Ox.map(getItem(v, level + 1, name), function($element) {
return $element.addClass(className);