W3C home > Mailing lists > Public > public-dap-commits@w3.org > January 2010

2009/dap/ReSpec.js/js respec.js,1.75,1.76

From: Robin Berjon via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 14 Jan 2010 16:10:50 +0000
To: public-dap-commits@w3.org
Message-Id: <E1NVSHa-0001LO-Ij@lionel-hutz.w3.org>
Update of /sources/public/2009/dap/ReSpec.js/js
In directory hutz:/tmp/cvs-serv5147/js

Modified Files:
	respec.js 
Log Message:
add support for base and unofficial styles

Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- respec.js	14 Jan 2010 15:18:05 -0000	1.75
+++ respec.js	14 Jan 2010 16:10:48 -0000	1.76
@@ -59,6 +59,7 @@
     authors:        [],
 
     recTrackStatus: ["FPWD", "WD", "LC", "CR", "PR", "PER", "REC"],
+    noTrackStatus:  ["MO", "unofficial", "base"],
     status2text:    {
         NOTE:           "Note",
         "WG-NOTE":      "Working Group Note",
@@ -77,6 +78,8 @@
         PER:            "Proposed Edited Recommendation",
         REC:            "Recommendation",
         RSCND:          "Rescinded Recommendation",
+        unofficial:     "Unofficial Draft",
+        base:           "Document",
     },
     status2long:    {
         FPWD:           "First Public Working Draft",
@@ -264,6 +267,7 @@
         if (!cfg.maxTocLevel) cfg.maxTocLevel = 0;
         for (var k in cfg) this[k] = cfg[k];
         this.isRecTrack = this.recTrackStatus.indexOf(this.specStatus) >= 0;
+        this.isNoTrack = this.noTrackStatus.indexOf(this.specStatus) >= 0;
         // this.specStatus = this._getMetaFor("http://berjon.com/prop/spec-status", "ED");
         // this.shortName = this._getMetaFor("http://berjon.com/prop/short-name", "xxx-xxx");
         // this.publishDate = this._getDateFor("head > time[itemprop='http://berjon.com/prop/publish-date']");
@@ -308,7 +312,16 @@
         }
         var statStyle = this.specStatus;
         if (statStyle == "FPWD" || statStyle == "LC") statStyle = "WD";
-        var css = "http://www.w3.org/StyleSheets/TR/W3C-" + statStyle + ".css";
+        var css;
+        if (statStyle == "unofficial") {
+            css = "http://www.w3.org/StyleSheets/TR/w3c-unofficial";
+        }
+        else if (statStyle == "base") {
+            css = "http://www.w3.org/StyleSheets/TR/base";
+        }
+        else {
+            css = "http://www.w3.org/StyleSheets/TR/W3C-" + statStyle;// + ".css";
+        }
         this._insertCSS(css, false);
     },
     
@@ -379,11 +392,11 @@
             "<p><a href='http://www.w3.org/'><img width='72' height='48' src='http://www.w3.org/Icons/w3c_home' alt='W3C'/></a>" +
             "<h1>" + this.title + "</h1>" +
             "<h2>W3C " + this.status2text[this.specStatus] + " " + this._humanDate(this.publishDate) + "</h2><dl>";
-        if (this.specStatus != "MO")
+        if (!this.isNoTrack)
             header += "<dt>This Version:</dt><dd><a href='" + thisVersion + "'>" + thisVersion + "</a></dd>" + 
                       "<dt>Latest Published Version:</dt><dd>" + latestVersion + "</dd>" + 
                       "<dt>Latest Editor's Draft:</dt><dd><a href='" + this.edDraftURI + "'>" + this.edDraftURI + "</a></dd>";
-        if (this.specStatus != "FPWD" && this.specStatus != "MO")
+        if (this.specStatus != "FPWD" && !this.isNoTrack)
             header += "<dt>Previous version:</dt><dd>" + prevVersion + "</dd>";
 
         if (this.prevRecShortname) {
@@ -431,9 +444,10 @@
     
     makeSotD:     function () {
         var sotd;
-        if (this.specStatus == "MO") {
+        if (this.isNoTrack) {
+            var mc = (this.specStatus == "MO") ? " member-confidential" : "";
             sotd = "<section id='sotd' class='introductory'><h2>Status of This Document</h2>" +
-                "<p>This document is merely a W3C-internal member-confidential document. It has no "+
+                "<p>This document is merely a W3C-internal" + mc + " document. It has no "+
                 "official standing of any kind and does not represent consensus of the W3C Membership.</p></section>";
         }
         else {
Received on Thursday, 14 January 2010 16:10:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 14 January 2010 16:10:53 GMT