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 cr.define('md_history', function() { | 5 cr.define('md_history', function() { |
6 var HistoryItem = Polymer({ | 6 var HistoryItem = Polymer({ |
7 is: 'history-item', | 7 is: 'history-item', |
8 | 8 |
9 properties: { | 9 properties: { |
10 // Underlying HistoryEntry data for this item. Contains read-only fields | 10 // Underlying HistoryEntry data for this item. Contains read-only fields |
11 // from the history backend, as well as fields computed by history-list. | 11 // from the history backend, as well as fields computed by history-list. |
12 item: {type: Object, observer: 'showIcon_'}, | 12 item: {type: Object, observer: 'showIcon_'}, |
13 | 13 |
14 // True if the website is a bookmarked page. | 14 // True if the website is a bookmarked page. |
15 starred: {type: Boolean, reflectToAttribute: true}, | 15 starred: {type: Boolean, reflectToAttribute: true}, |
16 | 16 |
17 // Search term used to obtain this history-item. | 17 // Search term used to obtain this history-item. |
18 searchTerm: {type: String}, | 18 searchTerm: {type: String}, |
19 | 19 |
20 selected: {type: Boolean, notify: true}, | 20 selected: {type: Boolean, notify: true}, |
21 | 21 |
| 22 isFirstItem: {type: Boolean, reflectToAttribute: true}, |
| 23 |
22 isCardStart: {type: Boolean, reflectToAttribute: true}, | 24 isCardStart: {type: Boolean, reflectToAttribute: true}, |
23 | 25 |
24 isCardEnd: {type: Boolean, reflectToAttribute: true}, | 26 isCardEnd: {type: Boolean, reflectToAttribute: true}, |
25 | 27 |
26 hasTimeGap: {type: Boolean}, | 28 hasTimeGap: {type: Boolean}, |
27 | 29 |
28 numberOfItems: {type: Number} | 30 numberOfItems: {type: Number} |
29 }, | 31 }, |
30 | 32 |
31 /** | 33 /** |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 102 |
101 if (searchedTerm) | 103 if (searchedTerm) |
102 return currentItem.dateShort != nextItem.dateShort; | 104 return currentItem.dateShort != nextItem.dateShort; |
103 | 105 |
104 return currentItem.time - nextItem.time > BROWSING_GAP_TIME && | 106 return currentItem.time - nextItem.time > BROWSING_GAP_TIME && |
105 currentItem.dateRelativeDay == nextItem.dateRelativeDay; | 107 currentItem.dateRelativeDay == nextItem.dateRelativeDay; |
106 }; | 108 }; |
107 | 109 |
108 return { HistoryItem: HistoryItem }; | 110 return { HistoryItem: HistoryItem }; |
109 }); | 111 }); |
OLD | NEW |