OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html i18n-values="dir:textdirection;"> | 2 <html i18n-values="dir:textdirection;"> |
3 <head> | 3 <head> |
4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
5 <title i18n-content="title"></title> | 5 <title i18n-content="title"></title> |
6 <link rel="icon" href="../../app/theme/downloads_favicon.png"> | 6 <link rel="icon" href="../../app/theme/downloads_favicon.png"> |
7 <style> | 7 <style> |
8 body { | 8 body { |
9 background-color:white; | 9 background-color:white; |
10 color:black; | 10 color:black; |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 this.nodeStatus_ = createElementWithClassName('span', 'status'); | 375 this.nodeStatus_ = createElementWithClassName('span', 'status'); |
376 this.nodeTitleArea_.appendChild(this.nodeStatus_); | 376 this.nodeTitleArea_.appendChild(this.nodeStatus_); |
377 | 377 |
378 this.nodeURL_ = createElementWithClassName('div', 'url'); | 378 this.nodeURL_ = createElementWithClassName('div', 'url'); |
379 this.safe_.appendChild(this.nodeURL_); | 379 this.safe_.appendChild(this.nodeURL_); |
380 | 380 |
381 // Controls. | 381 // Controls. |
382 this.nodeControls_ = createElementWithClassName('div', 'controls'); | 382 this.nodeControls_ = createElementWithClassName('div', 'controls'); |
383 this.safe_.appendChild(this.nodeControls_); | 383 this.safe_.appendChild(this.nodeControls_); |
384 | 384 |
385 this.controlShow_ = createLink(bind(this.show_, this), | 385 // We don't need "show in folder" in chromium os. See download_ui.cc and |
386 localStrings.getString('control_showinfolder')); | 386 // http://code.google.com/p/chromium-os/issues/detail?id=916. |
387 this.nodeControls_.appendChild(this.controlShow_); | 387 var showinfolder = localStrings.getString('control_showinfolder'); |
| 388 if (showinfolder) { |
| 389 this.controlShow_ = createLink(bind(this.show_, this), showinfolder); |
| 390 this.nodeControls_.appendChild(this.controlShow_); |
| 391 } else { |
| 392 this.controlShow_ = null; |
| 393 } |
388 | 394 |
389 // Pause/Resume are a toggle. | 395 // Pause/Resume are a toggle. |
390 this.controlPause_ = createLink(bind(this.togglePause_, this), | 396 this.controlPause_ = createLink(bind(this.togglePause_, this), |
391 localStrings.getString('control_pause')); | 397 localStrings.getString('control_pause')); |
392 this.nodeControls_.appendChild(this.controlPause_); | 398 this.nodeControls_.appendChild(this.controlPause_); |
393 | 399 |
394 this.controlResume_ = createLink(bind(this.togglePause_, this), | 400 this.controlResume_ = createLink(bind(this.togglePause_, this), |
395 localStrings.getString('control_resume')); | 401 localStrings.getString('control_resume')); |
396 this.nodeControls_.appendChild(this.controlResume_); | 402 this.nodeControls_.appendChild(this.controlResume_); |
397 | 403 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 | 517 |
512 this.canvasProgress_.lineTo(Download.Progress.centerX, | 518 this.canvasProgress_.lineTo(Download.Progress.centerX, |
513 Download.Progress.centerY); | 519 Download.Progress.centerY); |
514 this.canvasProgress_.fill(); | 520 this.canvasProgress_.fill(); |
515 this.canvasProgress_.closePath(); | 521 this.canvasProgress_.closePath(); |
516 } else if (this.nodeProgressBackground_) { | 522 } else if (this.nodeProgressBackground_) { |
517 this.nodeProgressForeground_.style.display = 'none'; | 523 this.nodeProgressForeground_.style.display = 'none'; |
518 this.nodeProgressBackground_.style.display = 'none'; | 524 this.nodeProgressBackground_.style.display = 'none'; |
519 } | 525 } |
520 | 526 |
521 showInline(this.controlShow_, this.state_ == Download.States.COMPLETE); | 527 if (this.controlShow_) { |
| 528 showInline(this.controlShow_, this.state_ == Download.States.COMPLETE); |
| 529 } |
522 showInline(this.controlPause_, this.state_ == Download.States.IN_PROGRESS); | 530 showInline(this.controlPause_, this.state_ == Download.States.IN_PROGRESS); |
523 showInline(this.controlResume_, this.state_ == Download.States.PAUSED); | 531 showInline(this.controlResume_, this.state_ == Download.States.PAUSED); |
524 showInline(this.controlCancel_, this.state_ == Download.States.IN_PROGRESS |
| | 532 showInline(this.controlCancel_, this.state_ == Download.States.IN_PROGRESS |
| |
525 this.state_ == Download.States.PAUSED); | 533 this.state_ == Download.States.PAUSED); |
526 | 534 |
527 this.nodeSince_.innerHTML = this.since_; | 535 this.nodeSince_.innerHTML = this.since_; |
528 this.nodeDate_.innerHTML = this.date_; | 536 this.nodeDate_.innerHTML = this.date_; |
529 this.nodeURL_.innerHTML = this.url_; | 537 this.nodeURL_.innerHTML = this.url_; |
530 this.nodeStatus_.innerHTML = this.getStatusText_(); | 538 this.nodeStatus_.innerHTML = this.getStatusText_(); |
531 | 539 |
532 this.danger_.style.display = 'none'; | 540 this.danger_.style.display = 'none'; |
533 this.safe_.style.display = 'block'; | 541 this.safe_.style.display = 'block'; |
534 } | 542 } |
535 } | 543 } |
536 | 544 |
537 /** | 545 /** |
538 * Removes applicable bits from the DOM in preparation for deletion. | 546 * Removes applicable bits from the DOM in preparation for deletion. |
539 */ | 547 */ |
540 Download.prototype.clear = function() { | 548 Download.prototype.clear = function() { |
541 this.safe_.ondragstart = null; | 549 this.safe_.ondragstart = null; |
542 this.nodeFileLink_.onclick = null; | 550 this.nodeFileLink_.onclick = null; |
543 this.controlShow_.onclick = null; | 551 if (this.controlShow_) { |
| 552 this.controlShow_.onclick = null; |
| 553 } |
544 this.controlCancel_.onclick = null; | 554 this.controlCancel_.onclick = null; |
545 this.controlPause_.onclick = null; | 555 this.controlPause_.onclick = null; |
546 this.controlResume_.onclick = null; | 556 this.controlResume_.onclick = null; |
547 this.dangerDiscard_.onclick = null; | 557 this.dangerDiscard_.onclick = null; |
548 | 558 |
549 this.node.innerHTML = ''; | 559 this.node.innerHTML = ''; |
550 } | 560 } |
551 | 561 |
552 /** | 562 /** |
553 * @return {String} User-visible status update text. | 563 * @return {String} User-visible status update text. |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 <div id="downloads-summary"> | 721 <div id="downloads-summary"> |
712 <span id="downloads-summary-text" i18n-content="downloads">Downloads</span> | 722 <span id="downloads-summary-text" i18n-content="downloads">Downloads</span> |
713 <a id="clear-all" href="" onclick="clearAll();" i18n-content="clear_all">Cle
ar All</a> | 723 <a id="clear-all" href="" onclick="clearAll();" i18n-content="clear_all">Cle
ar All</a> |
714 </div> | 724 </div> |
715 <div id="downloads-display"></div> | 725 <div id="downloads-display"></div> |
716 </div> | 726 </div> |
717 <div class="footer"> | 727 <div class="footer"> |
718 </div> | 728 </div> |
719 </body> | 729 </body> |
720 </html> | 730 </html> |
OLD | NEW |