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

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

Issue 10119007: [File Manager]Disable "Copy" command if selection contains dimmed GData files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed debugging code Created 8 years, 8 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
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/js/file_transfer_controller.js
diff --git a/chrome/browser/resources/file_manager/js/file_transfer_controller.js b/chrome/browser/resources/file_manager/js/file_transfer_controller.js
index e81219931c4697431d83422b01574a33d8aa0fed..3346a209a727275ddedd7984a3e86001d42b8458 100644
--- a/chrome/browser/resources/file_manager/js/file_transfer_controller.js
+++ b/chrome/browser/resources/file_manager/js/file_transfer_controller.js
@@ -25,7 +25,7 @@ function FileTransferController(fileList,
this.dragNodes_ = [];
/**
- * File objects for seletced files.
+ * File objects for selected files.
* @type {Array.<File>}
*/
this.files_ = [];
@@ -78,7 +78,7 @@ FileTransferController.prototype = {
* |dataTransfer.effectAllowed| property ('move', 'copy', 'copyMove').
*/
cutOrCopy: function(dataTransfer, effectAllowed) {
- var directories = [];
+ var directories = [];
var files = [];
var entries = this.selectedEntries_;
for (var i = 0; i < entries.length; i++) {
@@ -105,6 +105,7 @@ FileTransferController.prototype = {
* Queue up a file copy operation based on the current system clipboard.
* @param {DataTransfer} dataTransfer System data transfer object.
* @param {DirectoryEntry=} opt_destination Paste destination.
+ * @return {string} "move"|"copy"
*/
paste: function(dataTransfer, opt_destination) {
var destination = opt_destination || this.currentDirectory;
@@ -254,7 +255,7 @@ FileTransferController.prototype = {
},
canCopyOrDrag_: function() {
- return this.selectedEntries_.length > 0;
+ return this.selectionAvailable_ && this.selectedEntries_.length > 0;
},
onCut_: function(event) {
@@ -381,6 +382,10 @@ FileTransferController.prototype = {
return this.directoryModel_.readonly;
},
+ set selectionAvailable(available) {
+ this.selectionAvailable_ = available;
dgozman 2012/04/18 16:07:37 I don't like this 'set from outside to work proper
Vladislav Kaznacheev 2012/04/18 16:36:24 Yeah, I hate it myself. But asking the file manage
+ },
+
get isOnGData() {
return this.directoryModel_.rootType == DirectoryModel.RootType.GDATA;
},
« no previous file with comments | « chrome/browser/resources/file_manager/js/file_manager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698