mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-11-03 17:13:05 +00:00
Add "multiple" attribute to browse widget
And default to non-multiple upload; that’s enough to enable the ability to take photos/videos directly on iOS
This commit is contained in:
@@ -36,7 +36,9 @@ BrowseWidget.prototype.render = function(parent,nextSibling) {
|
||||
// Create element
|
||||
var domNode = this.document.createElement("input");
|
||||
domNode.setAttribute("type","file");
|
||||
domNode.setAttribute("multiple","multiple");
|
||||
if(this.browseMultiple) {
|
||||
domNode.setAttribute("multiple","multiple");
|
||||
}
|
||||
// Add a click event handler
|
||||
domNode.addEventListener("change",function (event) {
|
||||
self.wiki.readFiles(event.target.files,function(tiddlerFieldsArray) {
|
||||
@@ -54,6 +56,7 @@ BrowseWidget.prototype.render = function(parent,nextSibling) {
|
||||
Compute the internal state of the widget
|
||||
*/
|
||||
BrowseWidget.prototype.execute = function() {
|
||||
this.browseMultiple = this.getAttribute("multiple");
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user