attachments fill parentType or relatedId w/o id if entity is not created
This commit is contained in:
@@ -340,6 +340,8 @@ Espo.define('views/fields/attachment-multiple', 'views/fields/base', function (D
|
||||
attachment.set('type', file.type || 'text/plain');
|
||||
attachment.set('role', 'Attachment');
|
||||
attachment.set('size', file.size);
|
||||
attachment.set('parentType', this.model.name);
|
||||
|
||||
attachment.once('sync', function () {
|
||||
if (canceledList.indexOf(attachment.cid) === -1) {
|
||||
$att.trigger('ready');
|
||||
|
||||
@@ -308,6 +308,7 @@ Espo.define('views/fields/file', 'views/fields/link', function (Dep) {
|
||||
attachment.set('type', fileParams.type || 'text/plain');
|
||||
attachment.set('size', fileParams.size);
|
||||
attachment.set('role', 'Attachment');
|
||||
attachment.set('relatedType', this.model.name);
|
||||
|
||||
attachment.once('sync', function () {
|
||||
if (!isCanceled) {
|
||||
|
||||
Reference in New Issue
Block a user