OLD | NEW |
---|---|
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 Polymer({ | 5 Polymer({ |
6 is: 'history-item', | 6 is: 'history-item', |
7 | 7 |
8 properties: { | 8 properties: { |
9 // Underlying HistoryEntry data for this item. Contains read-only fields | 9 // Underlying HistoryEntry data for this item. Contains read-only fields |
10 // from the history backend, as well as fields computed by history-list. | 10 // from the history backend, as well as fields computed by history-list. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 }); | 65 }); |
66 }, | 66 }, |
67 | 67 |
68 /** | 68 /** |
69 * Fires a custom event when the menu button is clicked. Sends the details of | 69 * Fires a custom event when the menu button is clicked. Sends the details of |
70 * the history item and where the menu should appear. | 70 * the history item and where the menu should appear. |
71 */ | 71 */ |
72 onMenuButtonTap_: function(e) { | 72 onMenuButtonTap_: function(e) { |
73 this.fire('toggle-menu', { | 73 this.fire('toggle-menu', { |
74 target: Polymer.dom(e).localTarget, | 74 target: Polymer.dom(e).localTarget, |
75 timestamp: this.timestamp, | 75 timestamp: 2,//this.timestamp, |
Dan Beam
2016/03/16 00:23:14
wat
michaelpg
2016/03/16 03:11:15
lol oops
| |
76 }); | 76 }); |
77 | 77 |
78 // Stops the 'tap' event from closing the menu when it opens. | 78 // Stops the 'tap' event from closing the menu when it opens. |
79 e.stopPropagation(); | 79 e.stopPropagation(); |
80 }, | 80 }, |
81 | 81 |
82 /** | 82 /** |
83 * Set the favicon image, based on the URL of the history item. | 83 * Set the favicon image, based on the URL of the history item. |
84 * @private | 84 * @private |
85 */ | 85 */ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 }, | 126 }, |
127 | 127 |
128 /** | 128 /** |
129 * Generates the title for this history card. | 129 * Generates the title for this history card. |
130 * @param {number} numberOfItems The number of items in the card. | 130 * @param {number} numberOfItems The number of items in the card. |
131 * @param {string} search The search term associated with these results. | 131 * @param {string} search The search term associated with these results. |
132 * @private | 132 * @private |
133 */ | 133 */ |
134 cardTitle_: function(numberOfItems, historyDate, search) { | 134 cardTitle_: function(numberOfItems, historyDate, search) { |
135 if (!search) | 135 if (!search) |
136 return this.item.dateRelativeDay; | 136 return 'blah';//this.item.dateRelativeDay; |
Dan Beam
2016/03/16 00:23:14
wut
michaelpg
2016/03/16 03:11:15
Done.
| |
137 | 137 |
138 var resultId = numberOfItems == 1 ? 'searchResult' : 'searchResults'; | 138 var resultId = numberOfItems == 1 ? 'searchResult' : 'searchResults'; |
139 return loadTimeData.getStringF('foundSearchResults', numberOfItems, | 139 return loadTimeData.getStringF('foundSearchResults', numberOfItems, |
140 loadTimeData.getString(resultId), search); | 140 loadTimeData.getString(resultId), search); |
141 } | 141 } |
142 }); | 142 }); |
OLD | NEW |