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

Unified Diff: ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.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/file_manager_ui.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
index 56544748d4d2b2d1e1c41b79500c21ba292e3337..6f11bfcf3a52a6c30a1618f6b42ccd990e59b1a2 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
@@ -87,12 +87,36 @@ var FileManagerUI = function(element, dialogType) {
this.conflictDialog = null;
/**
+ * Volume icon of location information on the toolbar.
+ * @type {HTMLElement}
+ */
+ this.locationVolumeIcon = null;
+
+ /**
+ * Breadcrumbs of location information on the toolbar.
+ * @type {BreadcrumbsController}
+ */
+ this.locationBreadcrumbs = null;
+
+ /**
+ * Search button.
+ * @type {HTMLElement}
+ */
+ this.searchButton = null;
+
+ /**
* Search box.
* @type {SearchBox}
*/
this.searchBox = null;
/**
+ * Toggle-view button.
+ * @type {HTMLElement}
+ */
+ this.toggleViewButton = null;
+
+ /**
* File type selector in the footer.
* @type {HTMLElement}
*/
@@ -197,11 +221,19 @@ FileManagerUI.prototype.initDialogs = function() {
};
/**
- * Initialize here elements, which are expensive
+ * Initializes here elements, which are expensive
* or hidden in the beginning.
*/
FileManagerUI.prototype.initAdditionalUI = function() {
+ this.locationVolumeIcon =
+ this.element_.querySelector('#location-volume-icon');
+
+ this.searchButton = this.element_.querySelector('#search-button');
+ this.searchButton.addEventListener('click',
+ this.onSearchButtonClick_.bind(this));
this.searchBox = new SearchBox(this.element_.querySelector('#search-box'));
+
+ this.toggleViewButton = this.element_.querySelector('#view-button');
};
/**
@@ -236,3 +268,13 @@ FileManagerUI.prototype.updateProfileBadge = function() {
}
}.bind(this));
};
+
+/**
+ * Handles click event on the search button.
+ * @param {Event} event Click event.
+ * @private
+ */
+FileManagerUI.prototype.onSearchButtonClick_ = function(event) {
+ this.searchBox.inputElement.focus();
+};
+

Powered by Google App Engine
This is Rietveld 408576698