- From: Felix Sasaki via cvs-syncmail <cvsmail@w3.org>
- Date: Thu, 23 Aug 2012 15:39:47 +0000
- To: public-multilingualweb-lt-commits@w3.org
Update of /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/examples/html5 In directory hutz:/tmp/cvs-serv28669 Modified Files: qaissues.js Log Message: small javascript change Index: qaissues.js =================================================================== RCS file: /w3ccvs/WWW/International/multilingualweb/lt/drafts/its20/examples/html5/qaissues.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- qaissues.js 23 Aug 2012 12:23:41 -0000 1.1 +++ qaissues.js 23 Aug 2012 15:39:45 -0000 1.2 @@ -1,19 +1,24 @@ function addqaissueattrs () - { -var spanlist = document.getElementsByTagName('span'); -for(i=0; i<spanlist.length; i++) { -if(spanlist[i].getAttribute('its-loc-quality-issues-ref') != '') { -spanlist[i].setAttribute("onclick","getqaissue(this.getAttribute('its-loc-quality-issues-ref'))"); -spanlist[i].setAttribute("class","qaissue"); -} -} +{ + var issuefoundtext = document.createTextNode("This file has a quality issue. Click on the yellow text to find out more."); + var mypara = document.createElement("p"); + mypara.appendChild(issuefoundtext); + myb = document.getElementsByTagName("body")[0]; + myb.appendChild(mypara); + var spanlist = document.getElementsByTagName('span'); + for(i=0; i<spanlist.length; i++) { + if(spanlist[i].getAttribute('its-loc-quality-issues-ref') != '') { + spanlist[i].setAttribute("onclick","getqaissue(this.getAttribute('its-loc-quality-issues-ref'))"); + spanlist[i].setAttribute("class","qaissue"); + } + } } function getqaissue (qiref) { -var qielem = document.getElementById(qiref.substr(1)); -var issues = qielem.childNodes; -var issueslist = new String; -for(i=0; i<issues.length; i++) { -if(issues[i].nodeType==1) { issueslist = issueslist + -issues[i].getAttribute('its-loc-quality-issue-type') + " "; } } -window.alert("QA issues found. Type(s) of issues: " + issueslist); + var qielem = document.getElementById(qiref.substr(1)); + var issues = qielem.childNodes; + var issueslist = new String; + for(i=0; i<issues.length; i++) { + if(issues[i].nodeType==1) { issueslist = issueslist + + issues[i].getAttribute('its-loc-quality-issue-type') + " "; } } + window.alert("QA issues found. Type(s) of issues: " + issueslist); } \ No newline at end of file
Received on Thursday, 23 August 2012 15:39:53 UTC