Fix #850
This commit is contained in:
parent
5ab5ac2bf6
commit
e71d4dcce2
|
@ -214,9 +214,10 @@ class FileManager implements ManagerInterface
|
|||
Dropzone.autoDiscover = false;
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var dropzoneOptions = {
|
||||
dictDefaultMessage: "'.tr('Clicca o trascina qui per caricare uno o più file.<br>(Max ulpload: '.$upload_max_filesize.' MB)').'",
|
||||
var dragdrop = new Dropzone("#'.$attachment_id.' .dropzone", {
|
||||
dictDefaultMessage: "'.tr('Clicca o trascina qui per caricare uno o più file').'.<br>('.tr('Max upload: _SIZE_', [
|
||||
'_SIZE_' => $upload_max_filesize.' MB'
|
||||
]).')",
|
||||
paramName: "file",
|
||||
maxFilesize: '.$upload_max_filesize.', // MB
|
||||
uploadMultiple: false,
|
||||
|
@ -229,25 +230,20 @@ $(document).ready(function() {
|
|||
this.on("sending", function(file, xhr, formData) {
|
||||
formData.append("categoria", $("#categoria").val());
|
||||
formData.append("nome_allegato", $("#nome_allegato").val());
|
||||
}),
|
||||
this.on("success", function (file) {
|
||||
//console.log("success > " + file.name);
|
||||
dragdrop.removeFile(file);
|
||||
}),
|
||||
this.on("complete", function (file) {
|
||||
});
|
||||
|
||||
this.on("success", function (file) {
|
||||
dragdrop.removeFile(file);
|
||||
});
|
||||
|
||||
this.on("complete", function (file) {
|
||||
// Ricarico solo quando ho finito
|
||||
if (this.getUploadingFiles().length === 0 && this.getQueuedFiles().length === 0) {
|
||||
reload_'.$attachment_id.'();
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var dragdrop = new Dropzone("div#dragdrop", dropzoneOptions);
|
||||
|
||||
});
|
||||
|
||||
// Modifica categoria
|
||||
$("#'.$attachment_id.' .category-edit").click(function() {
|
||||
|
|
Loading…
Reference in New Issue