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

Unified Diff: chrome/browser/resources/file_manager/js/file_manager.js

Issue 7764011: File Manager: Assorted fixes and polish (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/file_manager/js/file_manager.js
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index db46de394109b0d5c0a0209c45df30a44b332d2c..4b16e3ef4774550d6c77f9c768a61089e03c1d36 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -1618,6 +1618,8 @@ FileManager.prototype = {
* @param {Array.<Task>} tasksList The tasks list.
*/
FileManager.prototype.onTasksFound_ = function(selection, tasksList) {
+ this.taskButtons_.innerHTML = '';
+
for (var i = 0; i < tasksList.length; i++) {
var task = tasksList[i];
@@ -1653,9 +1655,10 @@ FileManager.prototype = {
}
this.renderTaskButton_(task);
}
- this.maybeRenderUnmountTask_(selection);
- // This needs to be done in separate function, as check requires
+
+ // These are done in separate functions, as the checks require
// asynchronous function calls.
+ this.maybeRenderUnmountTask_(selection);
this.maybeRenderFormattingTask_(selection);
};
@@ -2439,13 +2442,10 @@ FileManager.prototype = {
}
}
- if (this.selection.fileCount > 1) {
+ if (this.selection.totalCount > 0) {
// If more than one file is selected, make sure all checkboxes are lit
// up.
for (var i = 0; i < this.selection.entries.length; i++) {
- if (!this.selection.entries[i].isFile)
- continue;
-
var selectedIndex = this.selection.indexes[i];
var listItem = this.currentList_.getListItemByIndex(selectedIndex);
if (listItem)

Powered by Google App Engine
This is Rietveld 408576698