2009/dap/ReSpec.js/js respec.js,1.184,1.185

Update of /sources/public/2009/dap/ReSpec.js/js
In directory hutz:/tmp/cvs-serv30978

Modified Files:
	respec.js 
Log Message:
support multiple groups for the same document

Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -d -r1.184 -r1.185
--- respec.js	7 Feb 2012 16:56:38 -0000	1.184
+++ respec.js	27 Feb 2012 16:34:15 -0000	1.185
@@ -54,6 +54,14 @@
 function warning (str) {
     sn.element("li", { style: "color: #666" }, _errEl(), str);
 }
+function isArray (obj) {
+    return Object.prototype.toString.call(obj) == '[object Array]'
+}
+function joinAnd (arr) {
+    var last = arr.pop();
+    arr[arr.length - 1] += " and " + last;
+    return arr.join(", ");
+}
 berjon.respec = function () {
     for (var k in this.status2text) {
         if (this.status2long[k]) continue;
@@ -993,8 +1001,18 @@
                 "of this technical report can be found in the <a href='http://www.w3.org/TR/'>W3C technical reports " +
                 "index</a> at http://www.w3.org/TR/.</em></p>";
             if (custom) sotd += custom.innerHTML;
-            sotd +=
-                "<p>This document was published by the <a href='" + this.wgURI + "'>" + this.wg + "</a> as " + art + this.status2long[this.specStatus] + ".";
+            sotd += "<p>This document was published by the ";
+            if (isArray(this.wg)) {
+                var wgs = [];
+                for (var i = 0, n = this.wg.length; i < n; i++) {
+                    wgs.push("<a href='" + this.wgURI[i] + "'>" + this.wg[i] + "</a>")
+                }
+                sotd += joinAnd(wgs);
+            }
+            else {
+                sotd += "<a href='" + this.wgURI + "'>" + this.wg + "</a>";
+            }
+            sotd += " as " + art + this.status2long[this.specStatus] + ".";
             if (this.isRecTrack && this.specStatus != "REC") sotd += " This document is intended to become a W3C Recommendation.";
             sotd +=
                 " If you wish to make comments regarding this document, please send them to <a href='mailto:" + this.wgPublicList + "@w3.org'>" + 
@@ -1024,8 +1042,18 @@
 				sotd += " The group does not expect this document to become a W3C Recommendation.";
 			
             if (this.specStatus != "IG-NOTE") {
+                if (isArray(this.wgPatentURI)) {
+                    sotd += " W3C maintains a public list of any patent disclosures (";
+                    var wgs = [];
+                    for (var i = 0, n = this.wg.length; i < n; i++) {
+                        wgs.push("<a href='" + this.wgPatentURI[i] + "' rel='disclosure'>" + this.wg[i] + "</a>")
+                    }
+                    sotd += wgs.join(", ") + ") ";
+                }
+                else {
+                    sotd += " W3C maintains a <a href='" + this.wgPatentURI + "' rel='disclosure'>public list of any patent disclosures</a> ";
+                }
     			sotd +=
-    				" W3C maintains a <a href='" + this.wgPatentURI + "' rel='disclosure'>public list of any patent disclosures</a> " +
                     "made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An " +
                     "individual who has actual knowledge of a patent which the individual believes contains " +
                     "<a href='http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential'>Essential Claim(s)</a> must disclose the " +

Received on Monday, 27 February 2012 16:34:23 UTC