mozilla

Revision 126432 of Template:JP Method

  • Revision slug: Template:JP_Method
  • Revision title: Template:JP Method
  • Revision id: 126432
  • Created:
  • Creator: kurt_cagle
  • Is current revision? No
  • Comment 161 words added, 48 words removed

Revision Source

<h3 class="method" id="{{if ($id!=null){$id} else {$name}}}"><a name="{{if ($id!=null) {$id} else {$name}}}" /><span class="method-name"><span class="script">$name</span></span>(<span class="script">buf = [];foreach(var param in $params){buf += ['<b class="param-name">'+param.name+'</b> as <i class="param-type">'+param.type+'</i>']};paramList = web.html(""+string.join(buf,", ")+"");paramList </span>) as <span class="method-type"><span class="script">$type</span></span></h3>
<div class="label"><strong>Description</strong></div>
<div class="description"><span class="script">web.html(""+$description+"")</span></div>
<div>buf = [];buf += ['<ul class="params-descr">'];foreach(var param in $params){buf += [' <li class="param-descr"><b class="param-descr-label">'+param.name+'</b>. <i class="param-descr-body">'+param.description+'</i></li>']};buf += ['</ul>'];paramDescrs = web.html(""+string.join(buf,"")+""); paramDescrs; if ($params[0]["properties"] != null){ props = $params[0].properties;buf = [];buf += ['<h4>Properties</he><table style="width: auto;" class="standard-table"><tr><th>Property Name</th><th>Property Type</th><th>Required?</th><th>Default Value</th><th>Description</th><tr>'];foreach(var prop in props){buf += ['<tr><td>'+prop.name+'</td><td>'+prop.type+'</td><td>'+(prop.required?"Required":"Optional")+'</td><td>'+(prop.required?"n/a":prop.default)+'</td><td>'+prop.description+'</td></tr>']};buf += ['</table>'];paramDescrs = web.html(""+string.join(buf,"")+""); paramDescrs } }}</div>
Revert to this revision