Drag-drop needs to import storage/file. Fixes #266.

This commit is contained in:
Thomas Wilburn 2014-07-02 23:02:12 -07:00
parent 3d3a916fe8
commit 346250789e
2 changed files with 5 additions and 4 deletions

View file

@ -1,8 +1,9 @@
define([ define([
"command", "command",
"sessions/addRemove", "sessions/addRemove",
"ui/projectManager" "ui/projectManager",
], function(command, addRemove, projectManager) { "storage/file"
], function(command, addRemove, projectManager, File) {
command.on("session:open-dragdrop", function(items) { command.on("session:open-dragdrop", function(items) {
[].forEach.call(items, function(entry){ [].forEach.call(items, function(entry){
@ -15,7 +16,7 @@ define([
var f = new File(entry); var f = new File(entry);
return f.read(function(err, data) { return f.read(function(err, data) {
addRemove.add(data, f); addRemove.add(data, f);
}, dialog); });
//directories get added to project //directories get added to project
} else if (entry.isDirectory) { } else if (entry.isDirectory) {
projectManager.insertDirectory(entry); projectManager.insertDirectory(entry);

View file

@ -1,7 +1,7 @@
{ {
"name": "Caret", "name": "Caret",
"description": "Professional text editing for Chrome and Chrome OS", "description": "Professional text editing for Chrome and Chrome OS",
"version": "1.4.19", "version": "1.4.20",
"manifest_version": 2, "manifest_version": 2,
"default_locale": "en", "default_locale": "en",
"icons": { "icons": {