Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 09:20:29 +01:00
FIX: use native javascript instead of jquery
Dieser Commit ist enthalten in:
Ursprung
eae5fbbbb8
Commit
cfe563e515
3 geänderte Dateien mit 8 neuen und 8 gelöschten Zeilen
|
@ -68,7 +68,7 @@ export default Controller.extend({
|
|||
file: null,
|
||||
filename: null,
|
||||
});
|
||||
$("#file-upload").val("");
|
||||
document.getElementById('custom-wizard-file-upload').value = '';
|
||||
},
|
||||
|
||||
@observes("importing", "destroying")
|
||||
|
@ -83,7 +83,7 @@ export default Controller.extend({
|
|||
|
||||
actions: {
|
||||
upload() {
|
||||
$("#file-upload").click();
|
||||
document.getElementById('custom-wizard-file-upload').click();
|
||||
},
|
||||
|
||||
clearFile() {
|
||||
|
@ -102,7 +102,7 @@ export default Controller.extend({
|
|||
if (maxFileSize < file.size) {
|
||||
this.setMessage("error", "file_size_error");
|
||||
this.set("file", null);
|
||||
$("#file-upload").val("");
|
||||
document.getElementById('custom-wizard-file-upload').value = '';
|
||||
} else {
|
||||
this.setProperties({
|
||||
file,
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
</div>
|
||||
{{/if}}
|
||||
|
||||
<Input
|
||||
id="file-upload"
|
||||
@type="file"
|
||||
{{input
|
||||
id="custom-wizard-file-upload"
|
||||
type="file"
|
||||
accept="application/json"
|
||||
{{on "input" (action "setFile" value="target.value")}} />
|
||||
input=(action "setFile")}}
|
||||
{{d-button
|
||||
id="upload-button"
|
||||
label="admin.wizard.manager.upload"
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
#file-upload {
|
||||
#custom-wizard-file-upload {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
Laden …
In neuem Issue referenzieren