Chromium Code Reviews| Index: chrome/browser/resources/md_history/history_card_manager.html |
| diff --git a/chrome/browser/resources/md_history/history_card_manager.html b/chrome/browser/resources/md_history/history_card_manager.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7108a87abc6593da7befccbd5ac3cc9501c978e2 |
| --- /dev/null |
| +++ b/chrome/browser/resources/md_history/history_card_manager.html |
| @@ -0,0 +1,61 @@ |
| +<link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.html"> |
| +<link rel="import" href="chrome://resources/html/cr/ui/position_util.html"> |
| +<link rel="import" href="chrome://history/history_card.html"> |
| + |
| +<dom-module id="history-card-manager"> |
| + <template> |
| + <style> |
| + :host { |
| + display: flex; |
| + flex-direction: column; |
| + } |
| + |
| + :host([menu-open]) #overflow-menu { |
| + display: block; |
| + } |
| + |
| + #overflow-menu { |
| + @apply(--shadow-elevation-2dp); |
| + border-radius: 2px; |
| + display: none; |
| + left: 0; |
|
Dan Beam
2016/01/27 18:20:07
have you tried this in RTL?
yingran
2016/01/28 00:51:01
Yep - position_util,js handles the actual position
|
| + position: absolute; |
| + top: 0; |
| + } |
| + |
| + #infinite-list { |
| + flex: 1; |
| + padding: 40px 0 0 0; |
| + } |
| + |
| + paper-item { |
| + -webkit-user-select: none; |
| + cursor: pointer; |
| + font: inherit; |
| + } |
| + |
| + paper-item:hover { |
| + background: #eaeaea; |
| + } |
| + </style> |
| + <iron-list items="{{historyDataByDay_}}" as="historyDay" id="infinite-list" |
| + on-scroll="scrollHandler_"> |
| + <template> |
| + <history-card history-date="{{historyDay.date}}" |
| + history-items="{{historyDay.historyItems}}"> |
| + </history-card> |
| + </template> |
| + </iron-list> |
| + <paper-menu id="overflow-menu"> |
| + <paper-item i18n-content="moreFromSite" on-tap="onMoreFromSiteTap_"> |
| + </paper-item> |
| + <paper-item i18n-content="removeFromHistory" |
| + on-tap="onRemoveFromHistoryTap_"> |
| + </paper-item> |
| + </paper-menu> |
| + </template> |
| + <script src="chrome://history/history_card_manager.js"></script> |
| +</dom-module> |