mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 12:07:19 +00:00
Browse widget: add support for nwdirectory attribute
This commit is contained in:
parent
49fad6dae9
commit
7bdaabce78
@ -46,10 +46,13 @@ BrowseWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
if(this.nwsaveas) {
|
if(this.nwsaveas) {
|
||||||
domNode.setAttribute("nwsaveas",this.nwsaveas);
|
domNode.setAttribute("nwsaveas",this.nwsaveas);
|
||||||
}
|
}
|
||||||
// Nw.js supports "webkitdirectory" to allow a directory to be selected
|
// Nw.js supports "webkitdirectory" and "nwdirectory" to allow a directory to be selected
|
||||||
if(this.webkitdirectory) {
|
if(this.webkitdirectory) {
|
||||||
domNode.setAttribute("webkitdirectory",this.webkitdirectory);
|
domNode.setAttribute("webkitdirectory",this.webkitdirectory);
|
||||||
}
|
}
|
||||||
|
if(this.nwdirectory) {
|
||||||
|
domNode.setAttribute("nwdirectory",this.nwdirectory);
|
||||||
|
}
|
||||||
// Add a click event handler
|
// Add a click event handler
|
||||||
domNode.addEventListener("change",function (event) {
|
domNode.addEventListener("change",function (event) {
|
||||||
if(self.message) {
|
if(self.message) {
|
||||||
@ -81,6 +84,7 @@ BrowseWidget.prototype.execute = function() {
|
|||||||
this.tooltip = this.getAttribute("tooltip");
|
this.tooltip = this.getAttribute("tooltip");
|
||||||
this.nwsaveas = this.getAttribute("nwsaveas");
|
this.nwsaveas = this.getAttribute("nwsaveas");
|
||||||
this.webkitdirectory = this.getAttribute("webkitdirectory");
|
this.webkitdirectory = this.getAttribute("webkitdirectory");
|
||||||
|
this.nwdirectory = this.getAttribute("nwdirectory");
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user