Template:unimplementedGeneric

  • Revision slug: Template:unimplementedGeneric
  • Revision title: Template:unimplementedGeneric
  • Revision id: 298054
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment

Revision Content

<% /* * first parameter: inline/header/method * second parameter: (optional) bug number * third parameter: additional information required for the type specified by the first parameter * method requires the method name * fourth parameter: (optional) Product bug eg. Mozilla(default), WebKit */ var product = ($3 || "Mozilla"); var s_str = mdn.localString({ "en-US": ["Unimplemented","see"], "de": ["Nicht implementiert","siehe"], "es": ["No implementado","mira"], "fr": ["Non implémenté","see"], "ja": ["未実装","参照"], "zh-CN": ["未实现","查看"] }); var str = s_str[0]; if ($1 && $0 != 'method') { switch(product.toLowerCase()) { case 'mozilla': str += " (" + s_str[1] + " " + template("bug", [$1]) + ")"; break; case 'webkit': str += " (" + s_str[1] + " " + template("WebkitBug", [$1]) + ")"; break; } } switch($0) { case 'inline': %><%-str%><% break; case 'header': %>

<%-str%>

<% break; case 'method': %>
<%- str %>

<%= $2 %>()

<% break; } %>

Revision Source

<%
/*
 * first parameter: inline/header/method
 * second parameter: (optional) bug number
 * third parameter: additional information required for the type specified by the first parameter
 *   method requires the method name
 * fourth parameter: (optional) Product bug eg. Mozilla(default), WebKit
*/

var product = ($3 || "Mozilla");

var s_str = mdn.localString({
  "en-US": ["Unimplemented","see"],
  "de":    ["Nicht implementiert","siehe"],
  "es":    ["No implementado","mira"],
  "fr":    ["Non implémenté","see"],
  "ja":    ["未実装","参照"],
  "zh-CN": ["未实现","查看"]
});
var str = s_str[0];

if ($1 && $0 != 'method') {
  switch(product.toLowerCase()) {
    case 'mozilla':
      str += " (" + s_str[1] + " " + template("bug", [$1]) + ")";
    break;
    case 'webkit':
      str += " (" + s_str[1] + " " + template("WebkitBug", [$1]) + ")";
    break;
  }
}

switch($0) {
  case 'inline':
    %><span class="inlineIndicator unimplemented unimplementedInline"><%-str%></span><%
    break;
  case 'header':
    %><div class="overheadIndicator unimplemented unimplementedHeader">
      <p><%-str%></p>
      </div><%
    break;
  case 'method':
    %><div>
      <span class="unimplemented unimplementedMethod" style="border: 1px solid #FF0000; background-color: #FEBCBC; padding: 2px; font-size: small; font-weight: bold; float: right; vertical-align: middle; white-space: nowrap;"><%- str %></span>
      <h3><%= $2 %>()</h3>
      </div><%
    break;
}
%>
Revert to this revision