2009/dap/ReSpec.js/js respec.js,1.161,1.162

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

Modified Files:
	respec.js 
Log Message:
more sensible numbering for tocIntroductory

Index: respec.js
===================================================================
RCS file: /sources/public/2009/dap/ReSpec.js/js/respec.js,v
retrieving revision 1.161
retrieving revision 1.162
diff -u -d -r1.161 -r1.162
--- respec.js	7 Sep 2011 19:01:24 -0000	1.161
+++ respec.js	7 Sep 2011 19:07:04 -0000	1.162
@@ -1115,7 +1115,8 @@
         if (secs.length == 0) return null;
         var ul = sn.element("ul", { "class": "toc" });
         for (var i = 0; i < secs.length; i++) {
-            var sec = secs[i];
+            var sec = secs[i],
+                isIntro = sn.hasClass(sec, "introductory");
             if (!sec.childNodes.length) continue;
             var h = sec.firstElementChild;
             var ln = h.localName.toLowerCase();
@@ -1143,7 +1144,7 @@
                 }
             }
             var id = sn.makeID(sec, null, title);
-            current[current.length-1]++;
+            if (!isIntro) current[current.length-1]++;
             var secnos = current.slice();
             if (sn.hasClass(sec, "appendix") && current.length == 1 && !this.appendixMode) {
                 this.lastNonAppendix = current[0];
@@ -1153,7 +1154,7 @@
             var secno = secnos.join(".");
             if (!/\./.test(secno)) secno = secno + ".";
             var df = sn.documentFragment();
-            sn.element("span", { "class": "secno" }, df, secno + " ");
+            if (!isIntro) sn.element("span", { "class": "secno" }, df, secno + " ");
             // sn.text(" ", df);
             var df2 = df.cloneNode(true);
             h.insertBefore(df, h.firstChild);

Received on Wednesday, 7 September 2011 19:07:08 UTC