Email: show replied field after reply

This commit is contained in:
yuri
2015-11-16 17:22:07 +02:00
parent b038a9449f
commit a2ff2e2f5e
4 changed files with 16 additions and 7 deletions
+6 -2
View File
@@ -307,7 +307,7 @@ Espo.define('views/email/detail', ['views/detail', 'email-helper'], function (De
var attributes = emailHelper.getReplyAttributes(this.model, data, cc);
this.notify('Loading...');
this.createView('quickCreate', 'Modals.ComposeEmail', {
this.createView('quickCreate', 'views/modals/compose-email', {
attributes: attributes,
}, function (view) {
view.render(function () {
@@ -315,7 +315,11 @@ Espo.define('views/email/detail', ['views/detail', 'email-helper'], function (De
});
view.notify(false);
});
this.listenToOnce(view, 'after:save', function () {
this.model.trigger('reply');
}, this);
}, this);
},
actionReplyToAll: function () {
@@ -34,12 +34,12 @@ Espo.define('views/email/record/detail-side', 'views/record/detail-side', functi
{
name: 'default',
label: false,
view: 'Record.Panels.DefaultSide',
view: 'views/record/panels/default-side',
options: {
fieldList: [
{
name: 'teams',
view: 'Fields.Teams'
view: 'views/fields/teams'
},
'replied',
'replies'
@@ -30,7 +30,7 @@ Espo.define('views/email/record/detail', 'views/record/detail', function (Dep) {
return Dep.extend({
sideView: 'Email.Record.DetailSide',
sideView: 'views/email/record/detail-side',
layoutNameConfigure: function () {
if (!this.model.isNew()) {
@@ -98,6 +98,11 @@ Espo.define('views/email/record/detail', 'views/record/detail', function (Dep) {
this.showActionItem('markAsImportant');
}
}, this);
this.listenTo(this.model, 'reply', function () {
this.showField('replies');
this.model.fetch();
}, this);
},
actionMarkAsImportant: function () {
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.define('Views.Modals.ComposeEmail', 'Views.Modals.Edit', function (Dep) {
Espo.define('views/modals/compose-email', 'views/modals/edit', function (Dep) {
return Dep.extend({
@@ -38,7 +38,7 @@ Espo.define('Views.Modals.ComposeEmail', 'Views.Modals.Edit', function (Dep) {
fullFormDisabled: true,
editViewName: 'Email.Record.Compose',
editViewName: 'views/email/record/compose',
columnCount: 2,