2009/dap/ReSpec.js/js respec.js,1.105,1.106

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

Modified Files:
	respec.js 
Log Message:
stop generating IDs for no reason

Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- respec.js	9 Apr 2010 12:52:45 -0000	1.105
+++ respec.js	13 Apr 2010 10:51:51 -0000	1.106
@@ -593,11 +593,8 @@
     makeAbstract:    function () {
         var abs = document.getElementById("abstract");
         if (!abs) error("Document must have one element with ID 'abstract'");
-        // var div = sn.renameEl(abs, "div");
-        // div.setAttribute("class", "section");
         var h2 = sn.element("h2", {}, null, "Abstract");
         abs.insertBefore(h2, abs.firstChild);
-        // abs.setAttribute("class", "introductory");
         sn.addClass(abs, "introductory");
     },
     
@@ -815,7 +812,7 @@
             var h = heads[i];
             if (h.hasAttribute("id")) continue;
             var par = h.parentNode;
-            if (par.localName.toLowerCase() == "div" && par.hasAttribute("id") && !h.previousElementSibling) continue;
+            if (par.localName.toLowerCase() == "section" && par.hasAttribute("id") && !h.previousElementSibling) continue;
             sn.makeID(h, null);
         }
     },
@@ -907,12 +904,12 @@
         
         // POST-PROCESSING
         // bibref
-    if(badrefcount > 0) {
-        error("Got " + badrefcount + " tokens looking like a reference, not in biblio DB: ");
-        for (var item in badrefs) {
-            error("Bad ref" + item + ", count = " + badrefs[item]);
+        if(badrefcount > 0) {
+            error("Got " + badrefcount + " tokens looking like a reference, not in biblio DB: ");
+            for (var item in badrefs) {
+                error("Bad ref: " + item + ", count = " + badrefs[item]);
+            }
         }
-    }
 
         var del = [];
         for (var k in informs) {
@@ -920,12 +917,13 @@
         }
         for (var i = 0; i < del.length; i++) delete informs[del[i]];
 
-    var refsec = sn.element("section", { id: "references", "class": "appendix" }, document.body);
-    sn.element("h2", {}, refsec, "References");
-    if (this.refNote) { 
-        var refnote = sn.element("p", {}, refsec);
-        refnote.innerHTML= this.refNote;
-    }
+        var refsec = sn.element("section", { id: "references", "class": "appendix" }, document.body);
+        sn.element("h2", {}, refsec, "References");
+        if (this.refNote) { 
+            var refnote = sn.element("p", {}, refsec);
+            refnote.innerHTML= this.refNote;
+        }
+
         var types = ["Normative", "Informative"];
         for (var i = 0; i < types.length; i++) {
             var type = types[i];

Received on Tuesday, 13 April 2010 10:51:54 UTC