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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/preview_panel.js

Issue 443333003: Show location, search button, and change-view button on the toolbar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 4 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: ui/file_manager/file_manager/foreground/js/ui/preview_panel.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/preview_panel.js b/ui/file_manager/file_manager/foreground/js/ui/preview_panel.js
index b669f4ab0ece321f9b3e493104031f92bcf1511f..0e0eabe979550cb2df57edfd0171eb17c2d99e29 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/preview_panel.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/preview_panel.js
@@ -47,14 +47,6 @@ var PreviewPanel = function(element,
this.element_ = element;
/**
- * @type {BreadcrumbsController}
- */
- this.breadcrumbs = new BreadcrumbsController(
- element.querySelector('#search-breadcrumbs'),
- metadataCache,
- volumeManager);
-
- /**
* @type {PreviewPanel.Thumbnails}
*/
this.thumbnails = new PreviewPanel.Thumbnails(
@@ -215,12 +207,7 @@ PreviewPanel.prototype.updateVisibility_ = function() {
newVisible = true;
break;
case PreviewPanel.VisibilityType.AUTO:
- newVisible =
- this.selection_.entries.length !== 0 ||
- (this.currentEntry_ &&
- this.volumeManager_.getLocationInfo(this.currentEntry_) &&
- !this.volumeManager_.getLocationInfo(
- this.currentEntry_).isRootEntry);
+ newVisible = this.selection_.entries.length !== 0;
break;
case PreviewPanel.VisibilityType.ALWAYS_HIDDEN:
newVisible = false;
@@ -246,12 +233,9 @@ PreviewPanel.prototype.updateVisibility_ = function() {
/**
* Update the text in the preview panel.
- *
- * @param {boolean} breadCrumbsVisible Whether the bread crumbs is visible or
- * not.
* @private
*/
-PreviewPanel.prototype.updatePreviewArea_ = function(breadCrumbsVisible) {
+PreviewPanel.prototype.updatePreviewArea_ = function() {
// If the preview panel is hiding, does not update the current view.
if (!this.visible)
return;
@@ -265,16 +249,14 @@ PreviewPanel.prototype.updatePreviewArea_ = function(breadCrumbsVisible) {
var entry;
if (this.selection_.totalCount == 1)
entry = this.selection_.entries[0];
- else if (this.selection_.totalCount == 0)
- entry = this.currentEntry_;
+ if (this.selection_.totalCount <= 1)
+ this.calculatingSizeLabel_.hidden = true;
if (entry) {
- this.breadcrumbs.show(entry);
- this.calculatingSizeLabel_.hidden = true;
- this.previewText_.textContent = '';
+ this.previewText_.textContent = util.getEntryLabel(
+ this.volumeManager_, entry);
return;
}
- this.breadcrumbs.hide();
// Obtains the preview text.
var text;

Powered by Google App Engine
This is Rietveld 408576698