-
-
@@ -229,14 +233,19 @@ function display_dropzone_field($url, $id = 'filedrop') {
// Remove the attachment from the database and the filesystem.
removeAttachment(file['databaseId']);
});
- this.on('queuecomplete', function(progress) {
+ this.on('complete', function(file) {
// Stop animating if complete.
- $('#total-progress').removeClass('active');
+ $(file.previewTemplate).find('#total-progress').removeClass('active');
+ });
+ this.on('queuecomplete', function() {
$('input[type=\"submit\"]').attr('disabled', false);
});
this.on('processing', function() {
$('input[type=\"submit\"]').attr('disabled', true);
});
+ this.on('uploadprogress', function(file, percentage) {
+ $(file.previewTemplate).find('#percentage').text(percentage + '%');
+ });
},
paramName: 'attachment',
url: '" . $url . "',
@@ -253,7 +262,8 @@ function display_dropzone_field($url, $id = 'filedrop') {
dictCancelUpload: ".json_encode($hesklang['attachment_cancel']).",
dictCancelUploadConfirmation: ".json_encode($hesklang['attachment_confirm_cancel']).",
dictRemoveFile: ".json_encode($hesklang['attachment_remove']).",
- previewTemplate: $('#previews').html()
+ previewTemplate: $('#previews').html(),
+ clickable: '.fileinput-button'
};
";
diff --git a/index.php b/index.php
index 90d99636..59ec77c5 100644
--- a/index.php
+++ b/index.php
@@ -990,7 +990,7 @@ function print_add_ticket()
?>