Commit 8da20e59 authored by haruki@chromium.org's avatar haruki@chromium.org

filemanager: Show Drive related gear menu for the sidebar "Shared with me", "Recent", "Offline".

BUG=230749
TEST=Open Files App, choose the sidebar item, verify the Drive related gear menus (e.g. "Show Google Docs files") are available.

Review URL: https://codereview.chromium.org/13871005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194554 0039d316-1c4b-4281-b951-d872f2087c98
parent 761b0942
......@@ -1664,8 +1664,11 @@ DialogType.isModal = function(type) {
* Drive.
*/
FileManager.prototype.isOnDrive = function() {
return this.directoryModel_.getCurrentRootType() === RootType.DRIVE ||
this.directoryModel_.getCurrentRootType() === RootType.DRIVE_OFFLINE;
var rootType = this.directoryModel_.getCurrentRootType();
return rootType === RootType.DRIVE ||
rootType === RootType.DRIVE_SHARED_WITH_ME ||
rootType === RootType.DRIVE_RECENT ||
rootType === RootType.DRIVE_OFFLINE;
};
/**
......@@ -2092,10 +2095,11 @@ DialogType.isModal = function(type) {
* @private
*/
FileManager.prototype.updateGearMenu_ = function() {
this.syncButton.hidden = !this.isOnDrive();
this.hostedButton.hidden = !this.isOnDrive();
var hideItemsForDrive = !this.isOnDrive();
this.syncButton.hidden = hideItemsForDrive;
this.hostedButton.hidden = hideItemsForDrive;
this.document_.getElementById('drive-separator').hidden =
!this.isOnDrive();
hideItemsForDrive;
// If volume has changed, then fetch remaining space data.
if (this.previousRootUrl_ != this.directoryModel_.getCurrentMountPointUrl())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment