Commit 173d82f4 authored by oleg@chromium.org's avatar oleg@chromium.org

In case of search add "Searching..." string to the spinner in the center.

Re-apply CL https://chromiumcodereview.appspot.com/10834062

BUG=137994

TEST=


Review URL: https://chromiumcodereview.appspot.com/10837020

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149168 0039d316-1c4b-4281-b951-d872f2087c98
parent 55f9f381
...@@ -11519,6 +11519,9 @@ Some features may be unavailable. Please check that the profile exists and you ...@@ -11519,6 +11519,9 @@ Some features may be unavailable. Please check that the profile exists and you
<message name="IDS_FILE_BROWSER_SEARCH_EXPAND" desc="In the File Manager, the text on the link to expand search when no matching files were found."> <message name="IDS_FILE_BROWSER_SEARCH_EXPAND" desc="In the File Manager, the text on the link to expand search when no matching files were found.">
Search all <ph name="DRIVE_NAME">$1<ex>Downloads</ex></ph> Search all <ph name="DRIVE_NAME">$1<ex>Downloads</ex></ph>
</message> </message>
<message name="IDS_FILE_BROWSER_SEARCHING_SPINNER" desc="In the File Manager, the text is shown near the spinner while waiting for the results of a search.">
Searching...
</message>
<message name="IDS_FILE_BROWSER_CHANGE_DEFAULT_MENU_ITEM" desc="In the File Manager, the text in the menu item to change the default action for a particular file type."> <message name="IDS_FILE_BROWSER_CHANGE_DEFAULT_MENU_ITEM" desc="In the File Manager, the text in the menu item to change the default action for a particular file type.">
Change default... Change default...
......
...@@ -522,6 +522,27 @@ button#detail-view:not([disabled]) { ...@@ -522,6 +522,27 @@ button#detail-view:not([disabled]) {
width: 22px; width: 22px;
} }
#spinner-container {
-webkit-box-align: center;
-webkit-box-pack: center;
bottom: 0;
display: -webkit-box;
left: 0;
position: absolute;
right: 0;
top: 0;
}
#spinner-with-text {
background-image: url('../images/common/spinner.svg');
background-repeat: no-repeat;
font-size: 16px;
height: 22px;
min-width: 22px;
opacity: 0.6;
padding-left: 26px;
}
.downloads-warning { .downloads-warning {
-webkit-box-align: center; -webkit-box-align: center;
-webkit-box-orient: horizontal; -webkit-box-orient: horizontal;
......
...@@ -609,7 +609,7 @@ FileManager.prototype = { ...@@ -609,7 +609,7 @@ FileManager.prototype = {
this.deleteButton_ = this.dialogDom_.querySelector('#delete-button'); this.deleteButton_ = this.dialogDom_.querySelector('#delete-button');
this.table_ = this.dialogDom_.querySelector('.detail-table'); this.table_ = this.dialogDom_.querySelector('.detail-table');
this.grid_ = this.dialogDom_.querySelector('.thumbnail-grid'); this.grid_ = this.dialogDom_.querySelector('.thumbnail-grid');
this.spinner_ = this.dialogDom_.querySelector('.spinner'); this.spinner_ = this.dialogDom_.querySelector('#spinner-with-text');
this.showSpinner_(false); this.showSpinner_(false);
this.butter_ = this.dialogDom_.querySelector('.butter-bar'); this.butter_ = this.dialogDom_.querySelector('.butter-bar');
this.unmountedPanel_ = this.dialogDom_.querySelector('#unmounted-panel'); this.unmountedPanel_ = this.dialogDom_.querySelector('#unmounted-panel');
...@@ -3317,7 +3317,13 @@ FileManager.prototype = { ...@@ -3317,7 +3317,13 @@ FileManager.prototype = {
FileManager.prototype.showSpinner_ = function(on) { FileManager.prototype.showSpinner_ = function(on) {
this.cancelSpinnerTimeout_(); this.cancelSpinnerTimeout_();
this.spinner_.style.display = on ? '' : 'none'; if (on) {
this.spinner_.textContent =
this.directoryModel_.isSearching() ? str('SEARCH_SPINNER') : '';
this.spinner_.style.display = '';
} else {
this.spinner_.style.display = 'none';
}
}; };
FileManager.prototype.onNewFolderCommand_ = function(event) { FileManager.prototype.onNewFolderCommand_ = function(event) {
......
...@@ -659,6 +659,7 @@ chrome.fileBrowserPrivate = { ...@@ -659,6 +659,7 @@ chrome.fileBrowserPrivate = {
SEARCH_TEXT_LABEL: 'Search', SEARCH_TEXT_LABEL: 'Search',
SEARCH_NO_MATCHING_FILES: 'No files match <b>"$1"</b>', SEARCH_NO_MATCHING_FILES: 'No files match <b>"$1"</b>',
SEARCH_SPINNER: 'Searching...',
TIME_TODAY: 'Today, $1', TIME_TODAY: 'Today, $1',
TIME_YESTERDAY: 'Yesterday, $1', TIME_YESTERDAY: 'Yesterday, $1',
......
...@@ -195,7 +195,9 @@ ...@@ -195,7 +195,9 @@
<div id="list-container"> <div id="list-container">
<div class=detail-table tabindex=0></div> <div class=detail-table tabindex=0></div>
<grid class=thumbnail-grid tabindex=0></grid> <grid class=thumbnail-grid tabindex=0></grid>
<div class=spinner></div> <div id="spinner-container">
<div id="spinner-with-text"></div>
</div>
<div class="gdrive-welcome page"></div> <div class="gdrive-welcome page"></div>
<div id="no-search-results"></div> <div id="no-search-results"></div>
</div> </div>
......
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