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

Side by Side Diff: chrome/browser/resources/md_history/history_item.js

Issue 2420583003: [MD History] Disable clicks in the date header of cards. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 * @param {!Element} root 6 * @param {!Element} root
7 * @param {?Element} boundary 7 * @param {?Element} boundary
8 * @param {cr.ui.FocusRow.Delegate} delegate 8 * @param {cr.ui.FocusRow.Delegate} delegate
9 * @constructor 9 * @constructor
10 * @extends {cr.ui.FocusRow} 10 * @extends {cr.ui.FocusRow}
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 * @param {MouseEvent} e 186 * @param {MouseEvent} e
187 * @private 187 * @private
188 */ 188 */
189 onCheckboxMousedown_: function(e) { 189 onCheckboxMousedown_: function(e) {
190 // Prevent shift clicking a checkbox from selecting text. 190 // Prevent shift clicking a checkbox from selecting text.
191 if (e.shiftKey) 191 if (e.shiftKey)
192 e.preventDefault(); 192 e.preventDefault();
193 }, 193 },
194 194
195 /** 195 /**
196 * @param {MouseEvent} e
197 * @private
198 */
199 onTitleMousedown_: function(e) {
200 e.preventDefault();
201 },
202
203 /**
196 * @private 204 * @private
197 * @return {string} 205 * @return {string}
198 */ 206 */
199 getEntrySummary_: function() { 207 getEntrySummary_: function() {
200 var item = this.item; 208 var item = this.item;
201 return loadTimeData.getStringF( 209 return loadTimeData.getStringF(
202 'entrySummary', item.dateTimeOfDay, 210 'entrySummary', item.dateTimeOfDay,
203 item.starred ? loadTimeData.getString('bookmarked') : '', item.title, 211 item.starred ? loadTimeData.getString('bookmarked') : '', item.title,
204 item.domain); 212 item.domain);
205 }, 213 },
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 330
323 if (searchedTerm) 331 if (searchedTerm)
324 return currentItem.dateShort != nextItem.dateShort; 332 return currentItem.dateShort != nextItem.dateShort;
325 333
326 return currentItem.time - nextItem.time > BROWSING_GAP_TIME && 334 return currentItem.time - nextItem.time > BROWSING_GAP_TIME &&
327 currentItem.dateRelativeDay == nextItem.dateRelativeDay; 335 currentItem.dateRelativeDay == nextItem.dateRelativeDay;
328 }; 336 };
329 337
330 return { HistoryItem: HistoryItem }; 338 return { HistoryItem: HistoryItem };
331 }); 339 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698