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

Unified Diff: chrome/browser/resources/downloads.html

Issue 506045: Don't show "show in foloder" in chrome os. (Closed)
Patch Set: " Created 11 years 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
« no previous file with comments | « chrome/browser/dom_ui/downloads_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/downloads.html
diff --git a/chrome/browser/resources/downloads.html b/chrome/browser/resources/downloads.html
index e5a4187eed9c2910743c642aa432ab5798e35e4b..29f5020c7e891f2847b04c94e122aae1a6f8e85d 100644
--- a/chrome/browser/resources/downloads.html
+++ b/chrome/browser/resources/downloads.html
@@ -382,9 +382,15 @@ function Download(download) {
this.nodeControls_ = createElementWithClassName('div', 'controls');
this.safe_.appendChild(this.nodeControls_);
- this.controlShow_ = createLink(bind(this.show_, this),
- localStrings.getString('control_showinfolder'));
- this.nodeControls_.appendChild(this.controlShow_);
+ // We don't need "show in folder" in chromium os. See download_ui.cc and
+ // http://code.google.com/p/chromium-os/issues/detail?id=916.
+ var showinfolder = localStrings.getString('control_showinfolder');
+ if (showinfolder) {
+ this.controlShow_ = createLink(bind(this.show_, this), showinfolder);
+ this.nodeControls_.appendChild(this.controlShow_);
+ } else {
+ this.controlShow_ = null;
+ }
// Pause/Resume are a toggle.
this.controlPause_ = createLink(bind(this.togglePause_, this),
@@ -518,7 +524,9 @@ Download.prototype.update = function(download) {
this.nodeProgressBackground_.style.display = 'none';
}
- showInline(this.controlShow_, this.state_ == Download.States.COMPLETE);
+ if (this.controlShow_) {
+ showInline(this.controlShow_, this.state_ == Download.States.COMPLETE);
+ }
showInline(this.controlPause_, this.state_ == Download.States.IN_PROGRESS);
showInline(this.controlResume_, this.state_ == Download.States.PAUSED);
showInline(this.controlCancel_, this.state_ == Download.States.IN_PROGRESS ||
@@ -540,7 +548,9 @@ Download.prototype.update = function(download) {
Download.prototype.clear = function() {
this.safe_.ondragstart = null;
this.nodeFileLink_.onclick = null;
- this.controlShow_.onclick = null;
+ if (this.controlShow_) {
+ this.controlShow_.onclick = null;
+ }
this.controlCancel_.onclick = null;
this.controlPause_.onclick = null;
this.controlResume_.onclick = null;
« no previous file with comments | « chrome/browser/dom_ui/downloads_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698