| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 checkbox.id = 'checkbox-' + this.id_; | 164 checkbox.id = 'checkbox-' + this.id_; |
| 165 checkbox.time = this.date.getTime(); | 165 checkbox.time = this.date.getTime(); |
| 166 checkbox.tabIndex = -1; | 166 checkbox.tabIndex = -1; |
| 167 checkbox.addEventListener('click', checkboxClicked); | 167 checkbox.addEventListener('click', checkboxClicked); |
| 168 entryBox.appendChild(checkbox); | 168 entryBox.appendChild(checkbox); |
| 169 | 169 |
| 170 // Clicking anywhere in the entryBox will check/uncheck the checkbox. | 170 // Clicking anywhere in the entryBox will check/uncheck the checkbox. |
| 171 entryBox.setAttribute('for', checkbox.id); | 171 entryBox.setAttribute('for', checkbox.id); |
| 172 entryBox.addEventListener('mousedown', entryBoxMousedown); | 172 entryBox.addEventListener('mousedown', entryBoxMousedown); |
| 173 entryBox.addEventListener('click', entryBoxClick); | 173 entryBox.addEventListener('click', entryBoxClick); |
| 174 entryBox.addEventListener('keydown', this.handleKeydown_.bind(this)); | |
| 175 } | 174 } |
| 176 | 175 |
| 176 entryBox.addEventListener('keydown', this.handleKeydown_.bind(this)); |
| 177 |
| 177 // Keep track of the drop down that triggered the menu, so we know | 178 // Keep track of the drop down that triggered the menu, so we know |
| 178 // which element to apply the command to. | 179 // which element to apply the command to. |
| 179 // TODO(dubroy): Ideally we'd use 'activate', but MenuButton swallows it. | 180 // TODO(dubroy): Ideally we'd use 'activate', but MenuButton swallows it. |
| 180 var setActiveVisit = function(e) { | 181 var setActiveVisit = function(e) { |
| 181 activeVisit = self; | 182 activeVisit = self; |
| 182 var menu = $('action-menu'); | 183 var menu = $('action-menu'); |
| 183 menu.dataset.devicename = self.deviceName; | 184 menu.dataset.devicename = self.deviceName; |
| 184 menu.dataset.devicetype = self.deviceType; | 185 menu.dataset.devicetype = self.deviceType; |
| 185 }; | 186 }; |
| 186 domain.textContent = this.domain_; | 187 domain.textContent = this.domain_; |
| (...skipping 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2327 historyView.reload(); | 2328 historyView.reload(); |
| 2328 } | 2329 } |
| 2329 | 2330 |
| 2330 // Add handlers to HTML elements. | 2331 // Add handlers to HTML elements. |
| 2331 document.addEventListener('DOMContentLoaded', load); | 2332 document.addEventListener('DOMContentLoaded', load); |
| 2332 | 2333 |
| 2333 // This event lets us enable and disable menu items before the menu is shown. | 2334 // This event lets us enable and disable menu items before the menu is shown. |
| 2334 document.addEventListener('canExecute', function(e) { | 2335 document.addEventListener('canExecute', function(e) { |
| 2335 e.canExecute = true; | 2336 e.canExecute = true; |
| 2336 }); | 2337 }); |
| OLD | NEW |