show type of events; link to type of return values (#192)

This commit is contained in:
Jeff Williams 2012-09-21 11:11:47 -07:00
parent 0a199914a1
commit c20f399d1d
6 changed files with 29 additions and 37 deletions

View File

@ -4,18 +4,13 @@
</div> </div>
<?js } ?> <?js } ?>
<?js if (data.type && data.type.names) { ?> <?js if (data.type) {?>
<dl> <dl>
<dt> <dt>
Type Type
</dt> </dt>
<dd> <dd>
<?js <?js= self.partial('type.tmpl', data.type) ?>
var typeNames = data.type.names,
self = this;
typeNames.forEach(function(name, i) { ?>
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span> <?js if (i < typeNames.length-1) { ?>|<?js } ?>
<?js }); ?>
</dd> </dd>
</dl> </dl>
<?js } ?> <?js } ?>

View File

@ -13,6 +13,15 @@
<?js= data.description ?> <?js= data.description ?>
</div> </div>
<?js } ?> <?js } ?>
<?js if (kind === 'event' && data.type) {?>
<h5>Type:</h5>
<ul>
<li>
<?js= self.partial('type.tmpl', data.type) ?>
</li>
</ul>
<?js } ?>
<?js if (data['this']) { ?> <?js if (data['this']) { ?>
<h5>This:</h5> <h5>This:</h5>

View File

@ -72,14 +72,9 @@
<?js } ?> <?js } ?>
<td class="type"> <td class="type">
<?js <?js if (param.type) {?>
if (param.type && param.type.names) { <?js= self.partial('type.tmpl', param.type) ?>
param.type.names.forEach(function(name, i) { ?> <?js } ?>
<?js= self.linkto(name, self.htmlsafe(name)) ?>
<?js if (i < param.type.names.length-1) { ?> | <?js } ?>
<?js });
}
?>
</td> </td>
<?js if (params.hasAttributes) {?> <?js if (params.hasAttributes) {?>

View File

@ -72,14 +72,9 @@
<?js } ?> <?js } ?>
<td class="type"> <td class="type">
<?js <?js if (prop.type) {?>
if (prop.type && prop.type.names) { <?js= self.partial('type.tmpl', prop.type) ?>
prop.type.names.forEach(function(name, i) { ?> <?js } ?>
<?js= self.linkto(name, self.htmlsafe(name)) ?>
<?js if (i < prop.type.names.length-1) { ?> | <?js } ?>
<?js });
}
?>
</td> </td>
<?js if (props.hasAttributes) {?> <?js if (props.hasAttributes) {?>

View File

@ -4,24 +4,13 @@
</div> </div>
<?js } ?> <?js } ?>
<?js <?js if (data.type) {?>
if (data.type) {
with(type) {
?>
<dl> <dl>
<dt> <dt>
Type Type
</dt> </dt>
<dd> <dd>
<?js <?js= this.partial('type.tmpl', data.type) ?>
var self = this;
names.forEach(function(name, i) { ?>
<span class="param-type"><?js= self.htmlsafe(name) ?></span> <?js if (i < names.length-1) { ?>|<?js } ?>
<?js }); ?>
</dd> </dd>
</dl> </dl>
<?js <?js } ?>
}
}
?>

View File

@ -0,0 +1,9 @@
<?js if (data.names) { ?>
<?js
var names = data.names,
self = this;
names.forEach(function(name, i) { ?>
<span class="param-type"><?js= self.linkto(name, self.htmlsafe(name)) ?></span>
<?js if (i < names.length-1) { ?>|<?js } ?>
<?js }); ?>
<?js } ?>