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

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

Issue 10837020: 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 2687 matching lines...) Expand 10 before | Expand all | Expand 10 after
3310 }; 3310 };
3311 3311
3312 FileManager.prototype.showSpinnerLater_ = function() { 3312 FileManager.prototype.showSpinnerLater_ = function() {
3313 this.cancelSpinnerTimeout_(); 3313 this.cancelSpinnerTimeout_();
3314 this.showSpinnerTimeout_ = 3314 this.showSpinnerTimeout_ =
3315 setTimeout(this.showSpinner_.bind(this, true), 500); 3315 setTimeout(this.showSpinner_.bind(this, true), 500);
3316 }; 3316 };
3317 3317
3318 FileManager.prototype.showSpinner_ = function(on) { 3318 FileManager.prototype.showSpinner_ = function(on) {
3319 this.cancelSpinnerTimeout_(); 3319 this.cancelSpinnerTimeout_();
3320 this.spinner_.style.display = on ? '' : 'none'; 3320 if (on) {
3321 this.spinner_.textContent =
3322 this.directoryModel_.isSearching() ? str('SEARCH_SPINNER') : '';
3323 this.spinner_.style.display = '';
3324 } else {
3325 this.spinner_.style.display = 'none';
3326 }
3321 }; 3327 };
3322 3328
3323 FileManager.prototype.onNewFolderCommand_ = function(event) { 3329 FileManager.prototype.onNewFolderCommand_ = function(event) {
3324 var defaultName = str('DEFAULT_NEW_FOLDER_NAME'); 3330 var defaultName = str('DEFAULT_NEW_FOLDER_NAME');
3325 3331
3326 // Find a name that doesn't exist in the data model. 3332 // Find a name that doesn't exist in the data model.
3327 var files = this.directoryModel_.getFileList(); 3333 var files = this.directoryModel_.getFileList();
3328 var hash = {}; 3334 var hash = {};
3329 for (var i = 0; i < files.length; i++) { 3335 for (var i = 0; i < files.length; i++) {
3330 var name = files.item(i).name; 3336 var name = files.item(i).name;
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after
4224 } 4230 }
4225 4231
4226 var defaultActionSeparator = 4232 var defaultActionSeparator =
4227 this.dialogDom_.querySelector('#default-action-separator'); 4233 this.dialogDom_.querySelector('#default-action-separator');
4228 4234
4229 this.defaultActionMenuItem_.hidden = !taskItem; 4235 this.defaultActionMenuItem_.hidden = !taskItem;
4230 defaultActionSeparator.hidden = !taskItem; 4236 defaultActionSeparator.hidden = !taskItem;
4231 } 4237 }
4232 })(); 4238 })();
4233 4239
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/css/file_manager.css ('k') | chrome/browser/resources/file_manager/js/mock_chrome.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698