Commit 07b760ae authored by dbeam's avatar dbeam Committed by Commit bot

MD Downloads: fix up some Polymer 1.2.3 issues and re-vulcanize

R=michaelpg@chromium.org
BUG=none
TEST=new Polymer, same great downloads taste!
NOPRESUBMIT=true  # for long lines in crisper.js

Review URL: https://codereview.chromium.org/1462153007

Cr-Commit-Position: refs/heads/master@{#361262}
parent 4485bf60
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
flex: 1 0; flex: 1 0;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
overflow-y: overlay;
} }
@media screen and (max-width: 1024px) { @media screen and (max-width: 1024px) {
...@@ -15,23 +16,13 @@ ...@@ -15,23 +16,13 @@
} }
} }
#panel {
--paper-header-panel-shadow: {
display: none;
};
--paper-header-panel-standard-container: {
display: flex;
overflow-y: overlay;
};
}
#no-downloads, #no-downloads,
#downloads-list { #downloads-list {
flex: 1; flex: 1;
} }
.loading #no-downloads, :host([loading]) #no-downloads,
.loading #downloads-list { :host([loading]) #downloads-list {
display: none; display: none;
} }
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
<link rel="import" href="chrome://resources/html/util.html"> <link rel="import" href="chrome://resources/html/util.html">
<link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> <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/iron-list/iron-list.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-header-panel/paper-header-panel.html">
<link rel="import" href="chrome://downloads/action_service.html"> <link rel="import" href="chrome://downloads/action_service.html">
<link rel="import" href="chrome://downloads/constants.html"> <link rel="import" href="chrome://downloads/constants.html">
<link rel="import" href="chrome://downloads/i18n_setup.html"> <link rel="import" href="chrome://downloads/i18n_setup.html">
...@@ -13,22 +12,20 @@ ...@@ -13,22 +12,20 @@
<dom-module id="downloads-manager"> <dom-module id="downloads-manager">
<template> <template>
<paper-header-panel id="panel" class="loading"> <downloads-toolbar id="toolbar"></downloads-toolbar>
<downloads-toolbar class="paper-header" id="toolbar"></downloads-toolbar> <iron-list id="downloads-list" items="{{items_}}"
<iron-list id="downloads-list" items="{{items_}}" hidden="[[!hasDownloads_]]">
hidden="[[!hasDownloads_]]"> <template>
<template> <downloads-item data="[[item]]" hide-date="[[item.hideDate]]">
<downloads-item data="[[item]]" hide-date="[[item.hideDate]]"> </downloads-item>
</downloads-item> </template>
</template> </iron-list>
</iron-list> <div id="no-downloads" hidden="[[hasDownloads_]]">
<div id="no-downloads" hidden="[[hasDownloads_]]"> <div>
<div> <div class="illustration"></div>
<div class="illustration"></div> <span><!-- Text populated in Manager#updateAll_(). --></span>
<span><!-- Text populated in Manager#updateAll_(). --></span>
</div>
</div> </div>
</paper-header-panel> </div>
</template> </template>
<link rel="import" type="css" href="chrome://downloads/shared_style.css"> <link rel="import" type="css" href="chrome://downloads/shared_style.css">
<link rel="import" type="css" href="chrome://downloads/manager.css"> <link rel="import" type="css" href="chrome://downloads/manager.css">
......
...@@ -17,6 +17,10 @@ cr.define('downloads', function() { ...@@ -17,6 +17,10 @@ cr.define('downloads', function() {
}, },
}, },
hostAttributes: {
loading: true,
},
/** /**
* @param {Event} e * @param {Event} e
* @private * @private
...@@ -99,7 +103,7 @@ cr.define('downloads', function() { ...@@ -99,7 +103,7 @@ cr.define('downloads', function() {
if (loadTimeData.getBoolean('allowDeletingHistory')) if (loadTimeData.getBoolean('allowDeletingHistory'))
this.$.toolbar.downloadsShowing = this.hasDownloads_; this.$.toolbar.downloadsShowing = this.hasDownloads_;
this.$.panel.classList.remove('loading'); this.removeAttribute('loading');
}, },
/** /**
......
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
--downloads-item-width: 622px; --downloads-item-width: 622px;
} }
[hidden] {
display: none !important;
}
paper-button { paper-button {
font-weight: 500; font-weight: 500;
margin: 0; margin: 0;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
width: var(--downloads-item-width); width: var(--downloads-item-width);
} }
:host-context(.loading) #actions { :host-context([loading]) #actions {
visibility: hidden; visibility: hidden;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment