Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <include src="../uber/uber_utils.js"> | 5 <include src="../uber/uber_utils.js"> |
| 6 <include src="history_focus_manager.js"> | 6 <include src="history_focus_manager.js"> |
| 7 | 7 |
| 8 /////////////////////////////////////////////////////////////////////////////// | 8 /////////////////////////////////////////////////////////////////////////////// |
| 9 // Globals: | 9 // Globals: |
| 10 /** @const */ var RESULTS_PER_PAGE = 150; | 10 /** @const */ var RESULTS_PER_PAGE = 150; |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 checkbox.id = 'checkbox-' + this.id_; | 198 checkbox.id = 'checkbox-' + this.id_; |
| 199 checkbox.time = this.date.getTime(); | 199 checkbox.time = this.date.getTime(); |
| 200 checkbox.addEventListener('click', checkboxClicked); | 200 checkbox.addEventListener('click', checkboxClicked); |
| 201 time.setAttribute('for', checkbox.id); | 201 time.setAttribute('for', checkbox.id); |
| 202 entryBox.appendChild(checkbox); | 202 entryBox.appendChild(checkbox); |
| 203 | 203 |
| 204 if (focusless) | 204 if (focusless) |
| 205 checkbox.tabIndex = -1; | 205 checkbox.tabIndex = -1; |
| 206 | 206 |
| 207 // Clicking anywhere in the entryBox will check/uncheck the checkbox. | 207 // Clicking anywhere in the entryBox will check/uncheck the checkbox. |
| 208 entryBox.setAttribute('for', checkbox.id); | 208 entryBox.setAttribute('for', checkbox.id); |
|
Evan Stade
2014/09/25 01:53:27
NOOOOOOOOOOO
kill for!!
Dan Beam
2014/09/25 03:59:45
Acknowledged.
| |
| 209 entryBox.addEventListener('mousedown', entryBoxMousedown); | 209 entryBox.addEventListener('mousedown', entryBoxMousedown); |
|
Evan Stade
2014/09/25 01:53:26
i feel like all of these should go in the if block
Dan Beam
2014/09/25 03:59:45
Done.
| |
| 210 entryBox.addEventListener('click', entryBoxClick); | |
| 211 entryBox.addEventListener('keydown', this.handleKeydown_.bind(this)); | 210 entryBox.addEventListener('keydown', this.handleKeydown_.bind(this)); |
| 211 | |
| 212 if (!isMobileVersion()) | |
| 213 entryBox.addEventListener('click', entryBoxClick); | |
| 212 } | 214 } |
| 213 | 215 |
| 214 // Keep track of the drop down that triggered the menu, so we know | 216 // Keep track of the drop down that triggered the menu, so we know |
| 215 // which element to apply the command to. | 217 // which element to apply the command to. |
| 216 // TODO(dubroy): Ideally we'd use 'activate', but MenuButton swallows it. | 218 // TODO(dubroy): Ideally we'd use 'activate', but MenuButton swallows it. |
| 217 var setActiveVisit = function(e) { | 219 var setActiveVisit = function(e) { |
| 218 activeVisit = self; | 220 activeVisit = self; |
| 219 var menu = $('action-menu'); | 221 var menu = $('action-menu'); |
| 220 menu.dataset.devicename = self.deviceName; | 222 menu.dataset.devicename = self.deviceName; |
| 221 menu.dataset.devicetype = self.deviceType; | 223 menu.dataset.devicetype = self.deviceType; |
| (...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2266 historyView.reload(); | 2268 historyView.reload(); |
| 2267 } | 2269 } |
| 2268 | 2270 |
| 2269 // Add handlers to HTML elements. | 2271 // Add handlers to HTML elements. |
| 2270 document.addEventListener('DOMContentLoaded', load); | 2272 document.addEventListener('DOMContentLoaded', load); |
| 2271 | 2273 |
| 2272 // This event lets us enable and disable menu items before the menu is shown. | 2274 // This event lets us enable and disable menu items before the menu is shown. |
| 2273 document.addEventListener('canExecute', function(e) { | 2275 document.addEventListener('canExecute', function(e) { |
| 2274 e.canExecute = true; | 2276 e.canExecute = true; |
| 2275 }); | 2277 }); |
| OLD | NEW |