email list view show attachments
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
{{#if hasAttachment}}
|
||||
<span class="list-icon-container pull-right">
|
||||
<span class="fas fa-paperclip small text-muted" title="{{translate 'hasAttachment' category='fields' scope='Email'}}"></span>
|
||||
<a
|
||||
role="button"
|
||||
tabindex="0"
|
||||
data-action="showAttachments"
|
||||
><span
|
||||
class="fas fa-paperclip small text-muted"
|
||||
title="{{translate 'hasAttachment' category='fields' scope='Email'}}"
|
||||
></span></a>
|
||||
</span>
|
||||
{{/if}}
|
||||
<a
|
||||
|
||||
@@ -32,6 +32,15 @@ define('views/email/fields/subject', ['views/fields/varchar'], function (Dep) {
|
||||
|
||||
listLinkTemplate: 'email/fields/subject/list-link',
|
||||
|
||||
events: {
|
||||
'click [data-action="showAttachments"]': function (e) {
|
||||
e.stopPropagation();
|
||||
|
||||
this.showAttachments();
|
||||
},
|
||||
...Dep.prototype.events,
|
||||
},
|
||||
|
||||
data: function () {
|
||||
var data = Dep.prototype.data.call(this);
|
||||
|
||||
@@ -81,11 +90,21 @@ define('views/email/fields/subject', ['views/fields/varchar'], function (Dep) {
|
||||
Dep.prototype.afterRender.call(this);
|
||||
},
|
||||
|
||||
|
||||
fetch: function () {
|
||||
var data = Dep.prototype.fetch.call(this);
|
||||
data.name = data.subject;
|
||||
return data;
|
||||
},
|
||||
|
||||
showAttachments: function () {
|
||||
Espo.Ui.notify(' ... ');
|
||||
|
||||
this.createView('dialog', 'views/email/modals/attachments', {model: this.model})
|
||||
.then(view => {
|
||||
view.render();
|
||||
|
||||
Espo.Ui.notify(false);
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user