summaryrefslogtreecommitdiffstats
path: root/pts-core/results-viewer/pts.js
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-10-26 13:23:49 -0400
committerMichael Larabel <michael@phx-laptop.(none)>2008-10-26 13:23:49 -0400
commit031aa7c4b28953c8b9fe2ccef4503b8fbf4a97b9 (patch)
tree1a7dc5107c8b4e91bee853ef91940a39d82964cc /pts-core/results-viewer/pts.js
parent6ce3ea3d071a1ed56337883a5670ef848c30c558 (diff)
downloadphoronix-test-suite-upstream-031aa7c4b28953c8b9fe2ccef4503b8fbf4a97b9.tar.gz
phoronix-test-suite-upstream-031aa7c4b28953c8b9fe2ccef4503b8fbf4a97b9.tar.xz
phoronix-test-suite-upstream-031aa7c4b28953c8b9fe2ccef4503b8fbf4a97b9.zip
pts-core: Rename pts-core/pts-results-viewer/ to
pts-core/results-viewer/
Diffstat (limited to 'pts-core/results-viewer/pts.js')
-rw-r--r--pts-core/results-viewer/pts.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/pts-core/results-viewer/pts.js b/pts-core/results-viewer/pts.js
new file mode 100644
index 0000000..8313283
--- /dev/null
+++ b/pts-core/results-viewer/pts.js
@@ -0,0 +1,46 @@
+
+function switchShow(i)
+{
+ if(document.getElementById(i).style.display == "none")
+ showObject(i);
+ else
+ hideObject(i);
+}
+function hideObject(i)
+{
+ document.getElementById(i).style.display = "none";
+}
+function showObject(i)
+{
+ document.getElementById(i).style.display = "block";
+}
+function setImagesFromURL()
+{
+ var html = "";
+ var pf = location.href;
+ pf = pf.substring(pf.search(/#/) + 1);
+ var imgarray = pf.split(",");
+
+ for(i = 0; i < imgarray.length; i++)
+ {
+ var exsplit = imgarray[i].split(".");
+
+ if(exsplit[1] == "svg")
+ html += "<p align=\"center\"><object type=\"image/svg+xml\" data=\"" + imgarray[i] + "\" /></p>";
+ else
+ html += "<p align=\"center\"><img src=\"" + imgarray[i] + "\" /></p>";
+ }
+
+ document.getElementById("pts_monitor").innerHTML = html;
+}
+function boldBodyComponents()
+{
+ var el = document.getElementsByName('pts_column_body');
+
+ for(var i = 0; i < el.length; i++)
+ {
+ el[i].innerHTML = el[i].innerHTML.replace(/:/, ":</strong>");
+ el[i].innerHTML = el[i].innerHTML.replace(/,/, ", <strong>");
+ el[i].innerHTML = "<strong>" + el[i].innerHTML;
+ }
+}