Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-26 02:50:28 +01:00
Merge pull request #201 from paviliondev/file-upload-test
Fix manager fix uploads
Dieser Commit ist enthalten in:
Commit
f7d074fb05
4 geänderte Dateien mit 6 neuen und 6 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,
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{input
|
{{input
|
||||||
id="file-upload"
|
id="custom-wizard-file-upload"
|
||||||
type="file"
|
type="file"
|
||||||
accept="application/json"
|
accept="application/json"
|
||||||
input=(action "setFile")}}
|
input=(action "setFile")}}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#file-upload {
|
#custom-wizard-file-upload {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
# name: discourse-custom-wizard
|
# name: discourse-custom-wizard
|
||||||
# about: Create custom wizards
|
# about: Create custom wizards
|
||||||
# version: 1.22.4
|
# version: 1.22.5
|
||||||
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George
|
# authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George
|
||||||
# url: https://github.com/paviliondev/discourse-custom-wizard
|
# url: https://github.com/paviliondev/discourse-custom-wizard
|
||||||
# contact_emails: development@pavilion.tech
|
# contact_emails: development@pavilion.tech
|
||||||
|
|
Laden …
In neuem Issue referenzieren