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

Side by Side Diff: ui/file_manager/file_manager/foreground/js/ui/banners.js

Issue 1215533003: Add a refresh button for providers which do not support watchers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests. Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Responsible for showing following banners in the file list. 6 * Responsible for showing following banners in the file list.
7 * - WelcomeBanner 7 * - WelcomeBanner
8 * - AuthFailBanner 8 * - AuthFailBanner
9 * @param {DirectoryModel} directoryModel The model. 9 * @param {DirectoryModel} directoryModel The model.
10 * @param {VolumeManagerWrapper} volumeManager The manager. 10 * @param {VolumeManagerWrapper} volumeManager The manager.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 var moreInnerButton = util.createChild( 205 var moreInnerButton = util.createChild(
206 more, 'imitate-paper-button primary', 'button'); 206 more, 'imitate-paper-button primary', 'button');
207 moreInnerButton.tabIndex = '-1'; 207 moreInnerButton.tabIndex = '-1';
208 moreInnerButton.textContent = str('DRIVE_WELCOME_CHECK_ELIGIBILITY'); 208 moreInnerButton.textContent = str('DRIVE_WELCOME_CHECK_ELIGIBILITY');
209 } else { 209 } else {
210 title.textContent = str('DRIVE_WELCOME_TITLE'); 210 title.textContent = str('DRIVE_WELCOME_TITLE');
211 more = util.createChild(links, 'plain-link', 'a'); 211 more = util.createChild(links, 'plain-link', 'a');
212 more.textContent = str('DRIVE_LEARN_MORE'); 212 more.textContent = str('DRIVE_LEARN_MORE');
213 more.href = str('GOOGLE_DRIVE_OVERVIEW_URL'); 213 more.href = str('GOOGLE_DRIVE_OVERVIEW_URL');
214 } 214 }
215 more.tabIndex = '20'; // See: go/filesapp-tabindex. 215 more.tabIndex = '21'; // See: go/filesapp-tabindex.
216 more.id = 'drive-welcome-link'; 216 more.id = 'drive-welcome-link';
217 more.target = '_blank'; 217 more.target = '_blank';
218 218
219 var dismiss; 219 var dismiss;
220 if (this.usePromoWelcomeBanner_) { 220 if (this.usePromoWelcomeBanner_) {
221 dismiss = util.createChild( 221 dismiss = util.createChild(
222 links, 'imitate-paper-button secondary', 'button'); 222 links, 'imitate-paper-button secondary', 'button');
223 } else { 223 } else {
224 dismiss = util.createChild(links, 'plain-link'); 224 dismiss = util.createChild(links, 'plain-link');
225 } 225 }
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 * @private 700 * @private
701 */ 701 */
702 Banners.prototype.maybeShowAuthFailBanner_ = function() { 702 Banners.prototype.maybeShowAuthFailBanner_ = function() {
703 var connection = this.volumeManager_.getDriveConnectionState(); 703 var connection = this.volumeManager_.getDriveConnectionState();
704 var showDriveNotReachedMessage = 704 var showDriveNotReachedMessage =
705 this.isOnCurrentProfileDrive() && 705 this.isOnCurrentProfileDrive() &&
706 connection.type == VolumeManagerCommon.DriveConnectionType.OFFLINE && 706 connection.type == VolumeManagerCommon.DriveConnectionType.OFFLINE &&
707 connection.reason == VolumeManagerCommon.DriveConnectionReason.NOT_READY; 707 connection.reason == VolumeManagerCommon.DriveConnectionReason.NOT_READY;
708 this.authFailedBanner_.hidden = !showDriveNotReachedMessage; 708 this.authFailedBanner_.hidden = !showDriveNotReachedMessage;
709 }; 709 };
OLDNEW
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/providers_model_unittest.js ('k') | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698