mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-05 05:13:52 +00:00
Add support for Nw.js special features to browse widget
This commit is contained in:
parent
3a33282705
commit
15f52bd7ce
@ -42,9 +42,14 @@ BrowseWidget.prototype.render = function(parent,nextSibling) {
|
|||||||
if(this.tooltip) {
|
if(this.tooltip) {
|
||||||
domNode.setAttribute("title",this.tooltip);
|
domNode.setAttribute("title",this.tooltip);
|
||||||
}
|
}
|
||||||
|
// Nw.js supports "nwsaveas" to force a "save as" dialogue that allows a new or existing file to be selected
|
||||||
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
|
||||||
|
if(this.webkitdirectory) {
|
||||||
|
domNode.setAttribute("webkitdirectory",this.webkitdirectory);
|
||||||
|
}
|
||||||
// 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) {
|
||||||
@ -71,6 +76,7 @@ BrowseWidget.prototype.execute = function() {
|
|||||||
this.param = this.getAttribute("param");
|
this.param = this.getAttribute("param");
|
||||||
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");
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user