qol: online upload: remove dialog when attachment received
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
const $attachmentOutput = $Attachments.find('.attachmentOutput');
|
||||
let $attachmentDownloadHost = null;
|
||||
let $dialogRemoveAttachment = null;
|
||||
let attachmentUploader = null;
|
||||
|
||||
function onAttachmentAdded(id, quick) {
|
||||
var data = { id: id };
|
||||
@@ -76,6 +77,10 @@
|
||||
buildAttachment(a, (a.AuthorId === $Attachments.attr('data-userid')), quick);
|
||||
else
|
||||
buildAttachment(a, false, quick);
|
||||
|
||||
if (attachmentUploader && attachmentUploader.onlineUploadCloseDialog) {
|
||||
attachmentUploader.onlineUploadCloseDialog();
|
||||
}
|
||||
} else {
|
||||
alert('Unable to add attachment: ' + d.Result);
|
||||
}
|
||||
@@ -182,7 +187,7 @@
|
||||
@if (canAddAttachments)
|
||||
{<text>
|
||||
//#region Add Attachments
|
||||
var attachmentUploader = new document.Disco.AttachmentUploader($Attachments);
|
||||
attachmentUploader = new document.Disco.AttachmentUploader($Attachments);
|
||||
|
||||
var $attachmentInput = $Attachments.find('.attachmentInput');
|
||||
$attachmentInput.find('.online-upload').on('click', function () {
|
||||
|
||||
Reference in New Issue
Block a user