attachments fill parentType or relatedId w/o id if entity is not created

This commit is contained in:
yuri
2017-05-10 11:35:23 +03:00
parent 875971fb6e
commit fb3d46d389
2 changed files with 3 additions and 0 deletions
@@ -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');
+1
View File
@@ -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) {