W3C home > Mailing lists > Public > public-html-commits@w3.org > January 2011

html5/status sort-status.js,1.2,1.3

From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 19 Jan 2011 22:56:40 +0000
To: public-html-commits@w3.org
Message-Id: <E1PfgxE-000717-Aj@lionel-hutz.w3.org>
Update of /sources/public/html5/status
In directory hutz:/tmp/cvs-serv26959

Modified Files:
	sort-status.js 
Log Message:
auto-number issue rows

Index: sort-status.js
===================================================================
RCS file: /sources/public/html5/status/sort-status.js,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- sort-status.js	22 Sep 2010 20:07:30 -0000	1.2
+++ sort-status.js	19 Jan 2011 22:56:38 -0000	1.3
@@ -57,3 +57,15 @@
     }
   }
 }
+var numberRows = function () {
+  var trs = document.getElementsByTagName('TR');
+  for (var j = 0; j < trs.length; j++) {
+    console.log(trs[j].parentNode.localName);
+    if (trs[j].parentNode.localName !== "thead") {
+      var td = document.createElement("TD");
+      td.textContent = j.toString();
+      trs[j].appendChild(td);
+    }
+  }
+}
+numberRows();
Received on Wednesday, 19 January 2011 22:56:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 19 January 2011 22:56:46 GMT