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 2124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2135 groupCheckbox.checked = false; | 2135 groupCheckbox.checked = false; |
2136 } | 2136 } |
2137 | 2137 |
2138 function entryBoxMousedown(event) { | 2138 function entryBoxMousedown(event) { |
2139 // Prevent text selection when shift-clicking to select multiple entries. | 2139 // Prevent text selection when shift-clicking to select multiple entries. |
2140 if (event.shiftKey) | 2140 if (event.shiftKey) |
2141 event.preventDefault(); | 2141 event.preventDefault(); |
2142 } | 2142 } |
2143 | 2143 |
2144 /** | 2144 /** |
2145 * Handle click event for entryBox labels. | 2145 * Handle click event for entryBoxes. |
2146 * @param {!Event} event A click event. | 2146 * @param {!Event} event A click event. |
2147 */ | 2147 */ |
2148 function entryBoxClick(event) { | 2148 function entryBoxClick(event) { |
2149 event = /** @type {!MouseEvent} */(event); | 2149 event = /** @type {!MouseEvent} */(event); |
2150 // Do nothing if a bookmark star is clicked. | 2150 // Do nothing if a bookmark star is clicked. |
2151 if (event.defaultPrevented) | 2151 if (event.defaultPrevented) |
2152 return; | 2152 return; |
2153 var element = event.target; | 2153 var element = event.target; |
2154 // Do nothing if the event happened in an interactive element. | 2154 // Do nothing if the event happened in an interactive element. |
2155 for (; element != event.currentTarget; element = element.parentNode) { | 2155 for (; element != event.currentTarget; element = element.parentNode) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2253 historyView.reload(); | 2253 historyView.reload(); |
2254 } | 2254 } |
2255 | 2255 |
2256 // Add handlers to HTML elements. | 2256 // Add handlers to HTML elements. |
2257 document.addEventListener('DOMContentLoaded', load); | 2257 document.addEventListener('DOMContentLoaded', load); |
2258 | 2258 |
2259 // This event lets us enable and disable menu items before the menu is shown. | 2259 // This event lets us enable and disable menu items before the menu is shown. |
2260 document.addEventListener('canExecute', function(e) { | 2260 document.addEventListener('canExecute', function(e) { |
2261 e.canExecute = true; | 2261 e.canExecute = true; |
2262 }); | 2262 }); |
OLD | NEW |