From 5f1cb260ae56afb112d27bb90d46b561d329ca7e Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Fri, 2 Sep 2022 12:07:14 +0300 Subject: [PATCH] reply btn style --- client/src/views/email/modals/detail.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/client/src/views/email/modals/detail.js b/client/src/views/email/modals/detail.js index ea78d5938c..da80c36235 100644 --- a/client/src/views/email/modals/detail.js +++ b/client/src/views/email/modals/detail.js @@ -37,31 +37,32 @@ define('views/email/modals/detail', ['views/modals/detail', 'views/email/detail' 'name': 'reply', 'label': 'Reply', 'hidden': this.model && this.model.get('status') === 'Draft', + style: 'danger', }); if (this.model) { - this.listenToOnce(this.model, 'sync', function () { - setTimeout(function () { + this.listenToOnce(this.model, 'sync', () => { + setTimeout(() => { this.model.set('isRead', true); - }.bind(this), 50); - }, this); + }, 50); + }); } - }, controlRecordButtonsVisibility: function () { Dep.prototype.controlRecordButtonsVisibility.call(this); if (this.model.get('status') === 'Draft' || !this.getAcl().check('Email', 'create')) { - this.hideButton('reply'); - } else { - this.showButton('reply'); + this.hideActionItem('reply'); + + return; } + + this.showActionItem('reply'); }, actionReply: function (data, e) { Detail.prototype.actionReply.call(this, {}, e, this.getPreferences().get('emailReplyToAllByDefault')); }, - }); });