aboutsummaryrefslogtreecommitdiffstats
path: root/tests/report-styles/index.js
diff options
context:
space:
mode:
authorAndrew John Hughes <[email protected]>2011-05-11 14:56:32 +0100
committerAndrew John Hughes <[email protected]>2011-05-11 14:56:32 +0100
commit3ad81af8c11d70e2cae4f7140e86d1cec1e02609 (patch)
tree7bb962e895aa65eaa513332bc25f913dbbd828de /tests/report-styles/index.js
parenta78e3962bcb462b2cdb4e0f9f36a00e513dc8a49 (diff)
Reverting unapproved change 235:114a981d3552
Diffstat (limited to 'tests/report-styles/index.js')
-rw-r--r--tests/report-styles/index.js67
1 files changed, 0 insertions, 67 deletions
diff --git a/tests/report-styles/index.js b/tests/report-styles/index.js
deleted file mode 100644
index 51093d1..0000000
--- a/tests/report-styles/index.js
+++ /dev/null
@@ -1,67 +0,0 @@
-
-if(typeof String.prototype.trim !== 'function') { String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); } }
-
-
-function negateIdDisplay(which){
- var e = document.getElementById(which);
- if (e.style.display=="block") {
- e.style.display="none"
- }else{
- e.style.display="block"
- }
- }
-
-
- function setClassDisplay(which,what) {
- var e = document.getElementsByClassName(which);
- for ( var i = 0; i < e.length; i++ ){
- e[i].style.display=what
- }
- }
-
-
- function loadXMLDoc(dname) {
- if (window.XMLHttpRequest) {
- xhttp=new XMLHttpRequest();
- }else{
- xhttp=new ActiveXObject("Microsoft.XMLHTTP");
- }
- xhttp.open("GET",dname,false);
- xhttp.send("");
- return xhttp.responseXML;
- }
-
-
- function xslt(sheet,data,dest) {
- var sheetName=sheet;
- var xmlName=data;
- var htmlDest=dest;
- // code for IE
- if (window.ActiveXObject) {
- var XML = new ActiveXObject("MSXML2.FreeThreadedDomDocument");
- XML.async = "false";
- XML.load(xmlName);
- var XSL = new ActiveXObject("MSXML2.FreeThreadedDomDocument");
- XSL.async = "false";
- XSL.load(sheetName);
- var XSLTCompiled = new ActiveXObject("MSXML2.XSLTemplate");
- //Add the stylesheet information
- XSLTCompiled.stylesheet = XSL.documentElement;
- //Create the XSLT processor
- var msSheet = XSLTCompiled.createProcessor();
- msSheet.input = XML
- //Perform the transform
- msSheet.transform();
- document.getElementById(htmlDest).innerHTML=msSheet.output;
- }
- // code for Mozilla, Firefox, Opera, etc.
- else if (document.implementation && document.implementation.createDocument){
- xsl=loadXMLDoc(sheetName);
- xml=loadXMLDoc(xmlName);
- xsltProcessor=new XSLTProcessor();
- xsltProcessor.importStylesheet(xsl);
- resultDocument = xsltProcessor.transformToFragment(xml,document);
- document.getElementById(htmlDest).appendChild(resultDocument);
- }
- setClassDisplay("trace","none"); //by default allare visible to protect disabled javascript
- }