|
@@ -840,15 +840,14 @@ class Ide {
|
|
|
}).appendTo(window.window.document.body).click();
|
|
|
}
|
|
|
|
|
|
- public function chooseFile( workingdir : String =null, exts : Array<String>, onSelect : Null<String> -> Void, allowNull=false ) {
|
|
|
+ public function chooseFile( exts : Array<String>, onSelect : Null<String> -> Void, allowNull = false, workingdir:String = null) {
|
|
|
var path = "";
|
|
|
- if (workingdir != null && workingdir != "#MISSING")
|
|
|
- {
|
|
|
+ if (workingdir != null && workingdir != "#MISSING") {
|
|
|
var pathArray = getPath(workingdir).split("/");
|
|
|
var c = isWindows ? "\\" : "/";
|
|
|
path = pathArray.join(c);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
var e = new Element('<input type="file" style="visibility:hidden" value="" nwworkingdir="$path" accept="${[for( e in exts ) "."+e].join(",")}"/>');
|
|
|
e.change(function(_) {
|
|
|
var file = e.val();
|