Template:spec

  • Revision slug: Template:spec
  • Revision title: Template:spec
  • Revision id: 10393
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment 9 words added

Revision Content

/* parameters: */
/* $0 = link to specification */
/* $1 = link text (optional) */
/* $2 = status of specification (optional). Possible values: WD, LC, CR, PR, REC. */

var status = $2;
var title = "";
var color = "";

switch(status) {
  case 'WD':
    color = "#ff0";
    title = "Working Draft";
    break;
  case 'LC':
    color = "#fc0";
    title = "Last Call";
    break;
  case 'CR':
    color = "#0f0";
    title = "Candidate Recommendation";
    break;
  case 'PR':
    color = "#0cf";
    title = "Proposed Recommendation";
    break;
  case 'REC':
    color = "#39f";
    title = "Recommendation";
    break;
}

web.link( $0, ($1 || $0) );

if ($2) {
      (status)
}

Revision Source

<pre class="script">
/* parameters: */
/* $0 = link to specification */
/* $1 = link text (optional) */
/* $2 = status of specification (optional). Possible values: WD, LC, CR, PR, REC. */

var status = $2;
var title = "";
var color = "";

switch(status) {
  case 'WD':
    color = "#ff0";
    title = "Working Draft";
    break;
  case 'LC':
    color = "#fc0";
    title = "Last Call";
    break;
  case 'CR':
    color = "#0f0";
    title = "Candidate Recommendation";
    break;
  case 'PR':
    color = "#0cf";
    title = "Proposed Recommendation";
    break;
  case 'REC':
    color = "#39f";
    title = "Recommendation";
    break;
}

web.link( $0, ($1 || $0) );

if ($2) {
   <span>&nbsp;</span><span>&nbsp;</span><span>&nbsp;</span><span title=(title) style=('background-color:' + color+ '; font-size: x-small; white-space: nowrap; padding: 2px;')>(status)</span>
}
</pre>
Revert to this revision