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

Side by Side Diff: chrome/browser/resources/bluetooth_internals/device_table.js

Issue 2558493004: bluetooth: Replace buttons in device table with action links. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/bluetooth_internals/bluetooth_internals.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Javascript for DeviceTable UI, served from chrome://bluetooth-internals/. 6 * Javascript for DeviceTable UI, served from chrome://bluetooth-internals/.
7 */ 7 */
8 8
9 cr.define('device_table', function() { 9 cr.define('device_table', function() {
10 var COLUMNS = { 10 var COLUMNS = {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 row.insertCell(); 114 row.insertCell();
115 } 115 }
116 116
117 // Make two extra cells for the inspect button and connect errors. 117 // Make two extra cells for the inspect button and connect errors.
118 var inspectCell = row.insertCell(); 118 var inspectCell = row.insertCell();
119 119
120 // TODO(crbug.com/663830): Replace connection error column with better 120 // TODO(crbug.com/663830): Replace connection error column with better
121 // notification system. 121 // notification system.
122 var connectErrorCell = row.insertCell(); 122 var connectErrorCell = row.insertCell();
123 123
124 var inspectButton = document.createElement('button'); 124 var inspectButton = document.createElement('a', 'action-link');
Dan Beam 2016/12/07 21:57:49 nit: Button -> Link?
125 inspectCell.appendChild(inspectButton); 125 inspectCell.appendChild(inspectButton);
126 inspectButton.addEventListener('click', function() { 126 inspectButton.addEventListener('click', function() {
127 this.handleInspectBtn_(row.sectionRowIndex); 127 this.handleInspectBtn_(row.sectionRowIndex);
128 }.bind(this)); 128 }.bind(this));
129 129
130 this.updateRow_(device, row.sectionRowIndex); 130 this.updateRow_(device, row.sectionRowIndex);
131 }, 131 },
132 132
133 /** 133 /**
134 * Deletes and recreates the table using the cached |devices_|. 134 * Deletes and recreates the table using the cached |devices_|.
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 cell.textContent = obj == null ? 'Unknown' : obj; 198 cell.textContent = obj == null ? 'Unknown' : obj;
199 cell.dataset.label = header.textContent; 199 cell.dataset.label = header.textContent;
200 } 200 }
201 }, 201 },
202 }; 202 };
203 203
204 return { 204 return {
205 DeviceTable: DeviceTable, 205 DeviceTable: DeviceTable,
206 }; 206 };
207 }); 207 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/bluetooth_internals/bluetooth_internals.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698