correctly display 'inherited properties' section title

This commit is contained in:
rolux 2012-06-02 12:01:35 +02:00
parent 9b6b6fd356
commit 82599aec75

View file

@ -98,7 +98,7 @@ Ox.DocPage = function(options, self) {
if (item.inherited) { if (item.inherited) {
Array.prototype.splice.apply(sections, [index, 0].concat( Array.prototype.splice.apply(sections, [index, 0].concat(
item.inherited.map(function(v, i) { item.inherited.map(function(v, i) {
var section = 'properties inherited from <code>' var section = 'Properties inherited from <code>'
+ v.name + '</code>'; + v.name + '</code>';
item[section] = v.properties; item[section] = v.properties;
return section; return section;
@ -163,7 +163,7 @@ Ox.DocPage = function(options, self) {
}) })
) )
.append('<span class="OxSection">' + ( .append('<span class="OxSection">' + (
Ox.startsWith('properties ', section) ? section Ox.startsWith(section, 'Properties') ? section
: Ox.toTitleCase( : Ox.toTitleCase(
section == 'returns' ? 'usage' section == 'returns' ? 'usage'
: section == 'tests' ? 'examples' : section == 'tests' ? 'examples'