mirror of
https://github.com/mon/BemaniPatcher.git
synced 2026-08-01 22:10:41 -07:00
Give file pickers unique IDs to fix many patchers
This commit is contained in:
+6
-4
@@ -251,13 +251,14 @@ class PatchContainer {
|
|||||||
self.loadFile(files[0]);
|
self.loadFile(files[0]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var filepickerId = createID();
|
||||||
this.fileInput = $("<input>",
|
this.fileInput = $("<input>",
|
||||||
{
|
{
|
||||||
"class": "fileInput",
|
"class": "fileInput",
|
||||||
"id": "any-file",
|
"id": filepickerId,
|
||||||
"type": "file",
|
"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.");
|
label.html("<strong>Choose a file</strong> or drag and drop.");
|
||||||
|
|
||||||
this.fileInput.on("change", function (e) {
|
this.fileInput.on("change", function (e) {
|
||||||
@@ -396,11 +397,12 @@ class Patcher {
|
|||||||
self.loadFile(files[0]);
|
self.loadFile(files[0]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var filepickerId = createID();
|
||||||
this.fileInput = $("<input>",
|
this.fileInput = $("<input>",
|
||||||
{"class": "fileInput",
|
{"class": "fileInput",
|
||||||
"id" : this.filename + '-file',
|
"id" : filepickerId,
|
||||||
"type" : 'file'});
|
"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.');
|
label.html('<strong>Choose a file</strong> or drag and drop.');
|
||||||
|
|
||||||
this.fileInput.on('change', function(e) {
|
this.fileInput.on('change', function(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user