2009/dap/ReSpec.js/js respec.js,1.112,1.113

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

Modified Files:
	respec.js 
Log Message:
Added use of previousDiffURI.
Made ApTest diff tool the default for now.
Updated documentation about diff tool.
Updated tests to use previousDiffURI parameter.


Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -d -r1.112 -r1.113
--- respec.js	16 Apr 2010 09:16:07 -0000	1.112
+++ respec.js	16 Apr 2010 14:31:30 -0000	1.113
@@ -230,7 +230,7 @@
         butH.onclick = function () { obj.hideSaveOptions(); obj.toHTML(); };
         var butS = sn.element("button", {}, this.saveMenu, "Save as HTML (Source)");
         butS.onclick = function () { obj.hideSaveOptions(); obj.toHTMLSource(); };
-        if (this.diffTool && this.previousURI) {
+        if (this.diffTool && (this.previousDiffURI || this.previousURI) {
             var butD = sn.element("button", {}, this.saveMenu, "Diffmark");
             butD.onclick = function () { obj.hideSaveOptions(); obj.toDiffHTML(); };
         }
@@ -286,7 +286,11 @@
         str += "<head><title>diff form</title></head>\n";
         str += "<body><form name='form' method='POST' action='" + this.diffTool + "'>\n";
         str += "<input type='hidden' name='base' value='" + base + "'>\n";
-        str += "<input type='hidden' name='oldfile' value='" + this.previousURI + "'>\n";
+        if (this.previousDiffURI) {
+            str += "<input type='hidden' name='oldfile' value='" + this.previousDiffURI + "'>\n"; 
+        } else {
+            str += "<input type='hidden' name='oldfile' value='" + this.previousURI + "'>\n";
+        }
         str += '<input type="hidden" name="newcontent" value="' + this._esc(this.toString()) + '">\n';
         str += '<p>Please wait...</p>';
         str += "</form></body></html>\n";
@@ -333,6 +337,7 @@
         if (!cfg.noIDLSorting) cfg.noIDLSorting = false;
         if (!cfg.noIDLIn) cfg.noIDLIn = false;
         if (!cfg.maxTocLevel) cfg.maxTocLevel = 0;
+        if (!cfg.diffTool) cfg.diffTool = 'http://www3.aptest.com/standards/htmldiff/htmldiff.pl',
         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;
@@ -527,7 +532,12 @@
             }
         }
         if (this.specStatus != "FPWD" && !this.isNoTrack)
-            header += "<dt>Previous version:</dt><dd>" + prevVersion + "</dd>";
+            if (!this.prevED) {
+                header += "<dt>Previous version:</dt><dd>" + prevVersion + "</dd>";
+            } else {
+                header += "<dt>Previous editor's draft:</dt><dd>" + prevED + "</dd>";
+            }
+        }
 
         if (this.prevRecShortname) {
             var prevRecURI = "http://www.w3.org/TR/" + this.prevRecShortname + "/";

Received on Friday, 16 April 2010 14:31:34 UTC