Drag-drop needs to import storage/file. Fixes #266.
This commit is contained in:
parent
3d3a916fe8
commit
346250789e
2 changed files with 5 additions and 4 deletions
7
js/sessions/dragdrop.js
vendored
7
js/sessions/dragdrop.js
vendored
|
@ -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);
|
||||||
|
|
|
@ -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": {
|
||||||
|
|
Loading…
Reference in a new issue