Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4522)

Unified Diff: chrome/browser/resources/md_downloads/item.html

Issue 1325853006: MD Downloads: wrap some <paper-buttons>s in <template is="dom-if"> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove InFolder Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_downloads/item.html
diff --git a/chrome/browser/resources/md_downloads/item.html b/chrome/browser/resources/md_downloads/item.html
index 10d39d15f598657a8ef01468479882f1a026f187..00dd78d973f17108adb90c63f83a1747728703b2 100644
--- a/chrome/browser/resources/md_downloads/item.html
+++ b/chrome/browser/resources/md_downloads/item.html
@@ -35,19 +35,33 @@
<div id="description"></div>
- <paper-progress id="progress"></paper-progress>
+ <template is="dom-if" if="[[showProgress_]]">
+ <paper-progress id="progress"
+ indeterminate$="[[isIndeterminate_(data_.percent)]]"
+ value$="[[data_.percent]]"></paper-progress>
+ </template>
<div id="safe" class="controls" hidden$="[[isDangerous_]]">
- <paper-button id="show" on-click="onShowClick_"
- i18n-content="controlShowInFolder" lowercase noink></paper-button>
- <paper-button id="retry" on-click="onRetryClick_"
- i18n-content="controlRetry"></paper-button>
- <paper-button id="pause" on-click="onPauseClick_"
- i18n-content="controlPause"></paper-button>
- <paper-button id="resume" on-click="onResumeClick_"
- i18n-content="controlResume"></paper-button>
- <paper-button id="cancel" on-click="onCancelClick_"
- i18n-content="controlCancel"></paper-button>
+ <template is="dom-if" if="[[completelyOnDisk_]]">
+ <paper-button id="show" on-click="onShowClick_"
+ lowercase noink>[[i18n_.show]]</paper-button>
+ </template>
+ <template is="dom-if" if="[[data_.retry]]">
+ <paper-button id="retry"
+ on-click="onRetryClick_">[[i18n_.retry]]</paper-button>
+ </template>
+ <template is="dom-if" if="[[isInProgress_]]">
+ <paper-button id="pause"
+ on-click="onPauseClick_">[[i18n_.pause]]</paper-button>
+ </template>
+ <template is="dom-if" if="[[data_.resume]]">
+ <paper-button id="resume"
+ on-click="onResumeClick_">[[i18n_.resume]]</paper-button>
+ </template>
+ <template is="dom-if" if="[[showCancel_]]">
+ <paper-button id="cancel"
+ on-click="onCancelClick_">[[i18n_.cancel]]</paper-button>
+ </template>
<span id="controlled-by"
i18n-values=".innerHTML:controlByExtension"></span>
</div>

Powered by Google App Engine
This is Rietveld 408576698