2009/dap/ReSpec.js/js respec.js,1.50,1.51

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

Modified Files:
	respec.js 
Log Message:
add support for optional authors list

Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- respec.js	29 Oct 2009 17:53:28 -0000	1.50
+++ respec.js	12 Nov 2009 17:24:28 -0000	1.51
@@ -54,6 +54,7 @@
 berjon.respec.prototype = {
     title:          null,
     editors:        [],
+    authors:        [],
 
     recTrackStatus: ["FPWD", "WD", "LC", "CR", "PR", "PER", "REC"],
     status2text:    {
@@ -254,6 +255,7 @@
         if (cfg.lcEnd) cfg.lcEnd = this._parseDate(cfg.lcEnd);
         if (cfg.specStatus == "LC" && !cfg.lcEnd) error("If specStatus is set to LC, then lcEnd must be defined");
         if (!cfg.editors) cfg.editors = [];
+        if (!cfg.authors) cfg.authors = [];
         if (!cfg.inlineCSS) cfg.inlineCSS = false;
         for (var k in cfg) this[k] = cfg[k];
         this.isRecTrack = this.recTrackStatus.indexOf(this.specStatus) >= 0;
@@ -349,6 +351,22 @@
             }
             header += "</dd>";
         }
+        if (this.authors.length > 0) {
+            if (this.authors.length > 1) header += "<dt>Authors:</dt>";
+            else                         header += "<dt>Author:</dt>";
+            for (var i = 0; i < this.authors.length; i++) {
+                var auth = this.authors[i];
+                header += "<dd>";
+                if (auth.url) header += "<a href='" + auth.url + "'>" + auth.name + "</a>";
+                else        header += auth.name;
+                if (auth.company) {
+                    header += ", ";
+                    if (auth.companyURL) header += "<a href='" + auth.companyURL + "'>" + auth.company + "</a>";
+                    else               header += auth.company;
+                }
+                header += "</dd>";
+            }
+        }
         header += 
             "</dl><p class='copyright'><a href='http://www.w3.org/Consortium/Legal/ipr-notice#Copyright'>Copyright</a> © " + 
             this.publishDate.getFullYear() + " <a href='http://www.w3.org/'><acronym title='World Wide Web Consortium'>W3C</acronym></a><sup>®</sup> " +

Received on Thursday, 12 November 2009 17:24:39 UTC