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,
|
file: null,
|
||||||
filename: null,
|
filename: null,
|
||||||
});
|
});
|
||||||
$("#file-upload").val("");
|
document.getElementById('custom-wizard-file-upload').value = '';
|
||||||
},
|
},
|
||||||
|
|
||||||
@observes("importing", "destroying")
|
@observes("importing", "destroying")
|
||||||
|
@ -83,7 +83,7 @@ export default Controller.extend({
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
upload() {
|
upload() {
|
||||||
$("#file-upload").click();
|
document.getElementById('custom-wizard-file-upload').click();
|
||||||
},
|
},
|
||||||
|
|
||||||
clearFile() {
|
clearFile() {
|
||||||
|
@ -102,7 +102,7 @@ export default Controller.extend({
|
||||||
if (maxFileSize < file.size) {
|
if (maxFileSize < file.size) {
|
||||||
this.setMessage("error", "file_size_error");
|
this.setMessage("error", "file_size_error");
|
||||||
this.set("file", null);
|
this.set("file", null);
|
||||||
$("#file-upload").val("");
|
document.getElementById('custom-wizard-file-upload').value = '';
|
||||||
} else {
|
} else {
|
||||||
this.setProperties({
|
this.setProperties({
|
||||||
file,
|
file,
|
||||||
|
|
|
@ -11,11 +11,11 @@
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<Input
|
{{input
|
||||||
id="file-upload"
|
id="custom-wizard-file-upload"
|
||||||
@type="file"
|
type="file"
|
||||||
accept="application/json"
|
accept="application/json"
|
||||||
{{on "input" (action "setFile" value="target.value")}} />
|
input=(action "setFile")}}
|
||||||
{{d-button
|
{{d-button
|
||||||
id="upload-button"
|
id="upload-button"
|
||||||
label="admin.wizard.manager.upload"
|
label="admin.wizard.manager.upload"
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#file-upload {
|
#custom-wizard-file-upload {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren