- From: Sam Ruby via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 22 Sep 2010 20:07:32 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/status In directory hutz:/tmp/cvs-serv19410 Modified Files: sort-status.js Log Message: Add a sort parameter Index: sort-status.js =================================================================== RCS file: /sources/public/html5/status/sort-status.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sort-status.js 25 Aug 2010 10:40:54 -0000 1.1 +++ sort-status.js 22 Sep 2010 20:07:30 -0000 1.2 @@ -41,3 +41,19 @@ last = event.target; }; } + +var query = window.location.search.substring(1); +var vars = query.split("&"); +for (var i=0; i<vars.length; i++) { + var pair = vars[i].split("="); + if (pair[0] == 'sort') { + header = pair[1].replace('+',' '); + for (var i = 0; i < ths.length; i += 1) { + if (ths[i].innerHTML == header) { + var event = window.document.createEvent('MouseEvent'); + event.initEvent("click", false, true); + ths[i].dispatchEvent(event); + } + } + } +}
Received on Wednesday, 22 September 2010 20:07:33 UTC