Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(518)

Unified Diff: build/android/pylib/results/presentation/javascript/main_html.js

Issue 2888723002: Make the table cells clickable, instead of the strings inside. (Closed)
Patch Set: cleaning up Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/pylib/results/presentation/template/main.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f73e4d3d093e93406192f25d6655611143e31526 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');
jbudorick 2017/05/17 18:34:06 nit: add spaces around =
BigBossZhiling 2017/05/17 20:08:23 Done.
+ for(var i = 0; i < tableCells.length; i++){
jbudorick 2017/05/17 18:34:06 nits: also add spaces between ){, here and below
BigBossZhiling 2017/05/17 20:08:23 Done.
+ (function (i){
+ var links = tableCells[i].getElementsByTagName('a');
+ if (links.length == 1) {
+ tableCells[i].addEventListener('click',function(){
jbudorick 2017/05/17 18:34:06 nits: space after , here and below
BigBossZhiling 2017/05/17 20:08:23 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);
+ }
+}
« no previous file with comments | « no previous file | build/android/pylib/results/presentation/template/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698