Skip to content

Commit

Permalink
Fixes yui#71 - Added readonly tag
Browse files Browse the repository at this point in the history
  • Loading branch information
davglass committed Sep 14, 2012
1 parent 8cb709e commit 5f27d2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,9 @@ YUI.add('doc-builder', function(Y) {
} else {
i.emit = self.options.attributesEmit;
}
if (i.readonly === '') {
i.readonly = true;
}

if (i.example && i.example.length) {
if (i.example.forEach) {
Expand Down
4 changes: 4 additions & 0 deletions themes/default/partials/attrs.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
<span class="flag required">required</span>
{{/if}}

{{#if readonly}}
<span class="flag readonly">readonly</span>
{{/if}}

<div class="meta">
{{#if overwritten_from}}
<p>Inherited from
Expand Down

0 comments on commit 5f27d2d

Please sign in to comment.