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

Unified Diff: ui/webui/resources/js/cr/ui/focus_grid.js

Issue 1000163002: downloads: put [column-type] in HTML template instead of JS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@undo-order
Patch Set: hcarmona@ review Created 5 years, 9 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 | « chrome/browser/resources/downloads/manager.js ('k') | ui/webui/resources/js/cr/ui/focus_row.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/ui/focus_grid.js
diff --git a/ui/webui/resources/js/cr/ui/focus_grid.js b/ui/webui/resources/js/cr/ui/focus_grid.js
index 307f5a10719f775385e8a67d63ba32bd74b0fa91..5269a5cf6a6b73e63b8a55912ac0085d8cb2bc4e 100644
--- a/ui/webui/resources/js/cr/ui/focus_grid.js
+++ b/ui/webui/resources/js/cr/ui/focus_grid.js
@@ -64,7 +64,7 @@ cr.define('cr.ui', function() {
// Only the clicked row should be active.
var target = assertInstanceof(e.target, Node);
this.focusGrid_.rows.forEach(function(row) {
- row.makeRowActive(row.contains(target));
+ row.makeActive(row.contains(target));
});
return true;
@@ -149,15 +149,12 @@ cr.define('cr.ui', function() {
if (this.rows.length == 0) {
// The first row should be active if no other row is focused.
- row.makeRowActive(true);
+ row.makeActive(true);
} else if (row.contains(document.activeElement)) {
// The current row should be made active if it's the activeElement.
- row.makeRowActive(true);
+ row.makeActive(true);
// Deactivate the first row.
- this.rows[0].makeRowActive(false);
- } else {
- // All other rows should be inactive.
- row.makeRowActive(false);
+ this.rows[0].makeActive(false);
}
// Add the row after its initial focus is set.
« no previous file with comments | « chrome/browser/resources/downloads/manager.js ('k') | ui/webui/resources/js/cr/ui/focus_row.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698