Commit 481ddf45 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

CodeEdtor/Preview: open folder selection in current folder

parent 5a77c24a
......@@ -285,14 +285,24 @@ define(["jquery", "emitter", "text!../html/preview.html"], function($, Emitter,
selectPath: function() {
var self = this;
var path = this.pathInput.val();
self.view.GET("/ajax/fs/exists", {
path: path
}, function(err, selectedType) {
if (err || selectedType != "d") {
path = "$HOME";
}
var args = {
"path": this.path,
"label": "Select preview folder",
"path": path,
"foldermode": true,
callback: function(path) {
self.setPath(path, false);
}
};
self.view.spawnInstance("file2", "FileSelector", args);
});
return this;
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment