mirror of
https://github.com/two-torial/webpatcher.git
synced 2024-11-15 03:17:36 +01:00
Give file pickers unique IDs to fix many patchers
This commit is contained in:
parent
9de05e7d1c
commit
200aa521dd
@ -251,13 +251,14 @@ class PatchContainer {
|
||||
self.loadFile(files[0]);
|
||||
});
|
||||
|
||||
var filepickerId = createID();
|
||||
this.fileInput = $("<input>",
|
||||
{
|
||||
"class": "fileInput",
|
||||
"id": "any-file",
|
||||
"id": filepickerId,
|
||||
"type": "file",
|
||||
});
|
||||
var label = $("<label>", {"class": "fileLabel", "for": "any-file"});
|
||||
var label = $("<label>", {"class": "fileLabel", "for": filepickerId});
|
||||
label.html("<strong>Choose a file</strong> or drag and drop.");
|
||||
|
||||
this.fileInput.on("change", function (e) {
|
||||
@ -396,11 +397,12 @@ class Patcher {
|
||||
self.loadFile(files[0]);
|
||||
});
|
||||
|
||||
var filepickerId = createID();
|
||||
this.fileInput = $("<input>",
|
||||
{"class": "fileInput",
|
||||
"id" : this.filename + '-file',
|
||||
"id" : filepickerId,
|
||||
"type" : 'file'});
|
||||
var label = $("<label>", {"class": "fileLabel", "for": this.filename + '-file'});
|
||||
var label = $("<label>", {"class": "fileLabel", "for": filepickerId});
|
||||
label.html('<strong>Choose a file</strong> or drag and drop.');
|
||||
|
||||
this.fileInput.on('change', function(e) {
|
||||
@ -495,4 +497,4 @@ class Patcher {
|
||||
window.Patcher = Patcher;
|
||||
window.PatchContainer = PatchContainer;
|
||||
|
||||
})(window, document);
|
||||
})(window, document);
|
||||
|
Loading…
Reference in New Issue
Block a user