')
- .append(removeLink)
+ .append($remove)
.append(
- $('
' + previewHtml + '')
- .addClass('gray-box')
+ $('
')
+ .addClass('preview gray-box')
+ .append(previewHtml)
);
let $container = $('').append($att);
@@ -655,8 +669,9 @@ define('views/fields/file', ['views/fields/link', 'helpers/file-upload'], functi
return $att;
}
- let $loading = $('' +
- this.translate('Uploading...') + '');
+ let $loading = $('')
+ .addClass('small uploading-message')
+ .text(this.translate('Uploading...'));
$container.append($loading);
@@ -749,11 +764,10 @@ define('views/fields/file', ['views/fields/link', 'helpers/file-upload'], functi
return;
}
- this.ajaxPostRequest(source + '/action/getAttachmentList', {
- id: model.id,
- })
- .then((attachmentList) => {
- attachmentList.forEach((item) => {
+ Espo.Ajax
+ .postRequest(source + '/action/getAttachmentList', {id: model.id})
+ .then(attachmentList => {
+ attachmentList.forEach(item => {
this.getModelFactory().create('Attachment', (attachment) => {
attachment.set(item);