Chromium Code Reviews| Index: chrome/browser/resources/md_history/grouped_list.html |
| diff --git a/chrome/browser/resources/md_history/grouped_list.html b/chrome/browser/resources/md_history/grouped_list.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1443c961a9f32e7854a6cb63b2640b5050170cac |
| --- /dev/null |
| +++ b/chrome/browser/resources/md_history/grouped_list.html |
| @@ -0,0 +1,118 @@ |
| +<link rel="import" href="chrome://resources/html/polymer.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-collapse.html"> |
| +<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> |
| +<link rel="import" href="chrome://history/constants.html"> |
| +<link rel="import" href="chrome://history/history_item.html"> |
| +<link rel="import" href="chrome://history/shared_style.html"> |
| + |
| +<dom-module id="history-grouped-list"> |
| + <template> |
| + <style include="shared-style"> |
| + :host { |
| + align-items: center; |
| + display: flex; |
| + flex-direction: column; |
| + overflow: overlay; |
| + position: relative; |
| + } |
| + |
| + #main-container { |
| + box-sizing: border-box; |
| + max-width: var(--card-max-width); |
| + min-width: var(--card-min-width); |
| + margin: var(--first-card-padding-top) var(--card-padding-side); |
|
tsergeant
2016/05/23 01:21:11
Why did this change to margin instead of padding?
calamity
2016/05/24 07:08:16
Oops, I think I was playing with something. The si
|
| + width: 100%; |
| + } |
| + |
| + .domain-heading { |
| + align-items: center; |
| + display: flex; |
| + height: 40px; |
| + padding: 0 20px; |
| + } |
| + |
| + .domain-count { |
| + color: rgb(151, 156, 160); |
| + padding-left: 10px; |
| + } |
| + |
| + .domain-heading-text { |
| + display: flex; |
| + } |
| + |
| + .group-container { |
| + background: #fff; |
| + border: 1px solid var(--card-border-color); |
| + border-bottom-width: 2px; |
| + margin-bottom: var(--card-padding-between); |
| + max-width: var(--card-max-width); |
| + min-width: var(--card-min-width); |
| + width: 100%; |
| + } |
| + |
| + .card-title { |
| + margin-bottom: var(--card-first-last-item-padding); |
| + } |
| + |
| + .domain-heading-text { |
| + flex: 1 1 0; |
| + } |
| + |
| + .dropdown-indicator { |
| + max-width: 16px; |
| + } |
| + |
| + history-item { |
| + --border-style: none; |
| + padding-left: 20px; |
| + } |
| + </style> |
| + <div id="no-results" class="centered-message" |
| + hidden$="[[hasResults(groupedHistoryData_.length)]]"> |
| + [[noResultsMessage_(searchedTerm, querying)]] |
| + </div> |
| + <div id="main-container" |
| + hidden$="[[!hasResults(groupedHistoryData_.length)]]"> |
| + <template is="dom-repeat" items="[[groupedHistoryData_]]" as="group" |
| + initial-count="1" index-as="groupIndex"> |
| + <div class="group-container"> |
| + <div class="card-title"> |
| + [[group.title]] |
| + </div> |
| + |
| + <template is="dom-repeat" items="[[group.domains]]" as="domain" |
| + initial-count="10" index-as="domainIndex"> |
| + <div> |
| + <div class="domain-heading" on-tap="toggleDomainExpanded_"> |
| + <div class="domain-heading-text"> |
| + <div class="website-icon" |
| + style="[[getWebsiteIconStyle(domain)]]"></div> |
| + <span>[[domain.domain]]</span> |
| + <span class="domain-count">[[domain.visits.length]]</span> |
| + </div> |
| + <iron-icon icon="[[getDropdownIcon(domain.expanded)]]" |
| + class="dropdown-indicator"></iron-icon> |
| + </div> |
| + <iron-collapse opened="{{domain.expanded}}" id="collapse"> |
| + <template is="dom-if" if="[[domain.rendered]]"> |
| + <template is="dom-repeat" items="[[domain.visits]]" |
| + as="item" initial-count="5" index-as="itemIndex"> |
| + <history-item item="[[item]]" |
| + starred="[[item.starred]]" |
| + selected="{{item.selected}}" |
| + has-time-gap="[[needsTimeGap_( |
| + groupIndex, domainIndex, itemIndex)]]" |
| + search-term="[[searchedTerm]]" |
| + number-of-items="[[historyData.length]]"> |
| + </history-item> |
| + </template> |
| + </template> |
| + </iron-collapse> |
| + </div> |
| + </template> |
| + </div> |
| + </template> |
| + </div> |
| + </template> |
| + <script src="chrome://history/grouped_list.js"></script> |
| +</dom-module> |