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

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

Issue 10409054: Do not show 'No files match "..."' message when GDrive welcome page is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 4470 matching lines...) Expand 10 before | Expand all | Expand 10 after
4481 }; 4481 };
4482 4482
4483 FileManager.prototype.onSearchBoxUpdate_ = function(event) { 4483 FileManager.prototype.onSearchBoxUpdate_ = function(event) {
4484 var searchString = this.document_.getElementById('search-box').value; 4484 var searchString = this.document_.getElementById('search-box').value;
4485 var noResultsDiv = this.document_.getElementById('no-search-results'); 4485 var noResultsDiv = this.document_.getElementById('no-search-results');
4486 4486
4487 function reportEmptySearchResults() { 4487 function reportEmptySearchResults() {
4488 if (this.directoryModel_.getFileList().length === 0) { 4488 if (this.directoryModel_.getFileList().length === 0) {
4489 var text = strf('SEARCH_NO_MATCHING_FILES', searchString); 4489 var text = strf('SEARCH_NO_MATCHING_FILES', searchString);
4490 noResultsDiv.innerHTML = text; 4490 noResultsDiv.innerHTML = text;
4491 noResultsDiv.hidden = false; 4491 noResultsDiv.setAttribute('show', 'true');
4492 } else { 4492 } else {
4493 noResultsDiv.hidden = true; 4493 noResultsDiv.removeAttribute('show');
4494 } 4494 }
4495 } 4495 }
4496 4496
4497 function hideNoResultsDiv() { 4497 function hideNoResultsDiv() {
4498 noResultsDiv.hidden = true; 4498 noResultsDiv.removeAttribute('show');
4499 } 4499 }
4500 4500
4501 this.directoryModel_.search(searchString, 4501 this.directoryModel_.search(searchString,
4502 reportEmptySearchResults.bind(this), 4502 reportEmptySearchResults.bind(this),
4503 hideNoResultsDiv.bind(this)); 4503 hideNoResultsDiv.bind(this));
4504 }; 4504 };
4505 4505
4506 FileManager.prototype.decorateSplitter = function(splitterElement) { 4506 FileManager.prototype.decorateSplitter = function(splitterElement) {
4507 var self = this; 4507 var self = this;
4508 4508
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
4655 4655
4656 function closeBanner() { 4656 function closeBanner() {
4657 self.cleanupGDataWelcome_(); 4657 self.cleanupGDataWelcome_();
4658 // Stop showing the welcome banner. 4658 // Stop showing the welcome banner.
4659 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT; 4659 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT;
4660 } 4660 }
4661 4661
4662 return maybeShowBanner; 4662 return maybeShowBanner;
4663 }; 4663 };
4664 })(); 4664 })();
OLDNEW
« no previous file with comments | « chrome/browser/resources/file_manager/css/file_manager.css ('k') | chrome/browser/resources/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698