Index: build/android/pylib/results/presentation/javascript/main_html.js |
diff --git a/build/android/pylib/results/presentation/javascript/main_html.js b/build/android/pylib/results/presentation/javascript/main_html.js |
index 3d94663e33f1b8bf44eda7483c7835650d3b2ffc..178faac1b410bdb5acfc21efaaf615859bf7cc23 100644 |
--- a/build/android/pylib/results/presentation/javascript/main_html.js |
+++ b/build/android/pylib/results/presentation/javascript/main_html.js |
@@ -191,3 +191,25 @@ function sortByColumn(head) { |
function sortSuiteTableByFailedTestCases() { |
sortByColumn(document.getElementById('number_fail_tests')); |
} |
+ |
+function setTableCellsAsClickable() { |
+ var tableCells = document.getElementsByTagName('td'); |
mikecase (-- gone --)
2017/05/17 21:20:21
s/var/const ?
BigBossZhiling
2017/05/17 23:25:48
Done.
|
+ for(var i = 0; i < tableCells.length; i++) { |
mikecase (-- gone --)
2017/05/17 21:20:21
nit: s/var/let
And then I think you can remove th
BigBossZhiling
2017/05/17 23:25:48
Good point. I didn't know about 'let'.
|
+ (function (i){ |
+ var links = tableCells[i].getElementsByTagName('a'); |
mikecase (-- gone --)
2017/05/17 21:20:21
s/var/const
BigBossZhiling
2017/05/17 23:25:48
Done.
|
+ if (links.length == 1) { |
+ tableCells[i].addEventListener('click',function() { |
mikecase (-- gone --)
2017/05/17 21:20:21
nit: app space after comma. Same nit applies a few
BigBossZhiling
2017/05/17 23:25:48
Done.
|
+ links[0].click(); |
+ }); |
+ tableCells[i].addEventListener('mouseover',function() { |
+ tableCells[i].style.cursor = 'pointer'; |
+ links[0].style.textDecoration = 'underline'; |
+ }); |
+ tableCells[i].addEventListener('mouseout',function() { |
+ tableCells[i].style.cursor = 'initial'; |
+ links[0].style.textDecoration = 'initial'; |
+ }); |
+ } |
+ })(i); |
+ } |
+} |