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

Side by Side Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 10834062: In case of search add "Searching..." string to the spinner in the center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
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 * FileManager constructor. 6 * FileManager constructor.
7 * 7 *
8 * FileManager objects encapsulate the functionality of the file selector 8 * FileManager objects encapsulate the functionality of the file selector
9 * dialogs, as well as the full screen file manager application (though the 9 * dialogs, as well as the full screen file manager application (though the
10 * latter is not yet implemented). 10 * latter is not yet implemented).
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 this.previewPanel_ = this.dialogDom_.querySelector('.preview-panel'); 602 this.previewPanel_ = this.dialogDom_.querySelector('.preview-panel');
603 this.previewSummary_ = this.dialogDom_.querySelector('.preview-summary'); 603 this.previewSummary_ = this.dialogDom_.querySelector('.preview-summary');
604 this.filenameInput_ = this.dialogDom_.querySelector( 604 this.filenameInput_ = this.dialogDom_.querySelector(
605 '#filename-input-box input'); 605 '#filename-input-box input');
606 this.taskItems_ = this.dialogDom_.querySelector('#tasks'); 606 this.taskItems_ = this.dialogDom_.querySelector('#tasks');
607 this.okButton_ = this.dialogDom_.querySelector('.ok'); 607 this.okButton_ = this.dialogDom_.querySelector('.ok');
608 this.cancelButton_ = this.dialogDom_.querySelector('.cancel'); 608 this.cancelButton_ = this.dialogDom_.querySelector('.cancel');
609 this.deleteButton_ = this.dialogDom_.querySelector('#delete-button'); 609 this.deleteButton_ = this.dialogDom_.querySelector('#delete-button');
610 this.table_ = this.dialogDom_.querySelector('.detail-table'); 610 this.table_ = this.dialogDom_.querySelector('.detail-table');
611 this.grid_ = this.dialogDom_.querySelector('.thumbnail-grid'); 611 this.grid_ = this.dialogDom_.querySelector('.thumbnail-grid');
612 this.spinner_ = this.dialogDom_.querySelector('.spinner'); 612 this.spinner_ = this.dialogDom_.querySelector('#spinner-with-text');
613 this.showSpinner_(false); 613 this.showSpinner_(false);
614 this.butter_ = this.dialogDom_.querySelector('.butter-bar'); 614 this.butter_ = this.dialogDom_.querySelector('.butter-bar');
615 this.unmountedPanel_ = this.dialogDom_.querySelector('#unmounted-panel'); 615 this.unmountedPanel_ = this.dialogDom_.querySelector('#unmounted-panel');
616 616
617 this.breadcrumbs_ = new BreadcrumbsController( 617 this.breadcrumbs_ = new BreadcrumbsController(
618 this.dialogDom_.querySelector('#dir-breadcrumbs')); 618 this.dialogDom_.querySelector('#dir-breadcrumbs'));
619 this.breadcrumbs_.addEventListener( 619 this.breadcrumbs_.addEventListener(
620 'pathclick', this.onBreadcrumbClick_.bind(this)); 620 'pathclick', this.onBreadcrumbClick_.bind(this));
621 this.searchBreadcrumbs_ = new BreadcrumbsController( 621 this.searchBreadcrumbs_ = new BreadcrumbsController(
622 this.dialogDom_.querySelector('#search-breadcrumbs')); 622 this.dialogDom_.querySelector('#search-breadcrumbs'));
(...skipping 2684 matching lines...) Expand 10 before | Expand all | Expand 10 after
3307 }; 3307 };
3308 3308
3309 FileManager.prototype.showSpinnerLater_ = function() { 3309 FileManager.prototype.showSpinnerLater_ = function() {
3310 this.cancelSpinnerTimeout_(); 3310 this.cancelSpinnerTimeout_();
3311 this.showSpinnerTimeout_ = 3311 this.showSpinnerTimeout_ =
3312 setTimeout(this.showSpinner_.bind(this, true), 500); 3312 setTimeout(this.showSpinner_.bind(this, true), 500);
3313 }; 3313 };
3314 3314
3315 FileManager.prototype.showSpinner_ = function(on) { 3315 FileManager.prototype.showSpinner_ = function(on) {
3316 this.cancelSpinnerTimeout_(); 3316 this.cancelSpinnerTimeout_();
3317 this.spinner_.style.display = on ? '' : 'none'; 3317 if (on) {
3318 this.spinner_.textContent =
3319 this.directoryModel_.isSearching() ? str('SEARCH_SPINNER') : '';
3320 this.spinner_.style.display = '';
3321 } else {
3322 this.spinner_.style.display = 'none';
3323 }
3318 }; 3324 };
3319 3325
3320 FileManager.prototype.onNewFolderCommand_ = function(event) { 3326 FileManager.prototype.onNewFolderCommand_ = function(event) {
3321 var defaultName = str('DEFAULT_NEW_FOLDER_NAME'); 3327 var defaultName = str('DEFAULT_NEW_FOLDER_NAME');
3322 3328
3323 // Find a name that doesn't exist in the data model. 3329 // Find a name that doesn't exist in the data model.
3324 var files = this.directoryModel_.getFileList(); 3330 var files = this.directoryModel_.getFileList();
3325 var hash = {}; 3331 var hash = {};
3326 for (var i = 0; i < files.length; i++) { 3332 for (var i = 0; i < files.length; i++) {
3327 var name = files.item(i).name; 3333 var name = files.item(i).name;
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
4221 } 4227 }
4222 4228
4223 var defaultActionSeparator = 4229 var defaultActionSeparator =
4224 this.dialogDom_.querySelector('#default-action-separator'); 4230 this.dialogDom_.querySelector('#default-action-separator');
4225 4231
4226 this.defaultActionMenuItem_.hidden = !taskItem; 4232 this.defaultActionMenuItem_.hidden = !taskItem;
4227 defaultActionSeparator.hidden = !taskItem; 4233 defaultActionSeparator.hidden = !taskItem;
4228 } 4234 }
4229 })(); 4235 })();
4230 4236
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698