From 2f751085e06651a7ff574ce0fab029dabdfd63da Mon Sep 17 00:00:00 2001 From: yuri Date: Fri, 15 May 2015 17:37:06 +0300 Subject: [PATCH] bcc --- application/Espo/Resources/layouts/Email/detail.json | 1 + .../Resources/layouts/Email/detailRestricted.json | 1 + .../Espo/Resources/layouts/Email/detailSmall.json | 1 + .../layouts/Email/detailSmallRestricted.json | 1 + frontend/client/src/views/email/record/detail.js | 12 ++++++++++++ 5 files changed, 16 insertions(+) diff --git a/application/Espo/Resources/layouts/Email/detail.json b/application/Espo/Resources/layouts/Email/detail.json index 990fa7b368..11a3cafc87 100644 --- a/application/Espo/Resources/layouts/Email/detail.json +++ b/application/Espo/Resources/layouts/Email/detail.json @@ -5,6 +5,7 @@ [{"name":"status"},{"name":"from"}], [{"name":"dateSent"}, {"name":"to"}], [{"name":"parent"}, {"name":"cc"}], + [false, {"name":"bcc"}], [{"name":"name","fullWidth":true}], [{"name":"body","fullWidth":true}], [{"name":"attachments"},{"name":"isHtml"}] diff --git a/application/Espo/Resources/layouts/Email/detailRestricted.json b/application/Espo/Resources/layouts/Email/detailRestricted.json index 8420f326d4..2d92fb3afc 100644 --- a/application/Espo/Resources/layouts/Email/detailRestricted.json +++ b/application/Espo/Resources/layouts/Email/detailRestricted.json @@ -5,6 +5,7 @@ [{"name":"status"},{"name":"from", "readOnly": true}], [{"name":"dateSent", "readOnly": true}, {"name":"to", "readOnly": true}], [{"name":"parent"}, {"name":"cc", "readOnly": true}], + [false, {"name":"bcc", "readOnly": true}], [{"name":"name","fullWidth":true, "readOnly": true}], [{"name":"body","fullWidth":true, "readOnly": true}], [{"name":"attachments", "readOnly": true, "fullWidth":true}] diff --git a/application/Espo/Resources/layouts/Email/detailSmall.json b/application/Espo/Resources/layouts/Email/detailSmall.json index bdc94d341d..dedc091a91 100644 --- a/application/Espo/Resources/layouts/Email/detailSmall.json +++ b/application/Espo/Resources/layouts/Email/detailSmall.json @@ -5,6 +5,7 @@ [{"name":"dateSent"}, {"name":"from"}], [{"name":"parent"}, {"name":"to"}], [false, {"name":"cc"}], + [false, {"name":"bcc"}], [{"name":"name", "fullWidth": true}], [{"name":"body", "fullWidth": true}], [{"name":"attachments", "fullWidth": true}] diff --git a/application/Espo/Resources/layouts/Email/detailSmallRestricted.json b/application/Espo/Resources/layouts/Email/detailSmallRestricted.json index 0138931243..308ed98780 100644 --- a/application/Espo/Resources/layouts/Email/detailSmallRestricted.json +++ b/application/Espo/Resources/layouts/Email/detailSmallRestricted.json @@ -5,6 +5,7 @@ [{"name":"dateSent", "readOnly": true}, {"name":"from", "readOnly": true}], [{"name":"parent"}, {"name":"to", "readOnly": true}], [false, {"name":"cc", "readOnly": true}], + [false, {"name":"bcc", "readOnly": true}], [{"name":"name", "readOnly": true, "fullWidth": true}], [{"name":"body", "readOnly": true, "fullWidth": true}], [{"name":"attachments", "readOnly": true, "fullWidth": true}] diff --git a/frontend/client/src/views/email/record/detail.js b/frontend/client/src/views/email/record/detail.js index 721f7191eb..025f174852 100644 --- a/frontend/client/src/views/email/record/detail.js +++ b/frontend/client/src/views/email/record/detail.js @@ -65,6 +65,14 @@ Espo.define('Views.Email.Record.Detail', 'Views.Record.Detail', function (Dep) { } }, + handleBccField: function () { + if (!this.model.get('bcc')) { + this.hideField('bcc'); + } else { + this.showField('bcc'); + } + }, + afterRender: function () { Dep.prototype.afterRender.call(this); @@ -76,6 +84,10 @@ Espo.define('Views.Email.Record.Detail', 'Views.Record.Detail', function (Dep) { this.listenTo(this.model, 'change:cc', function () { this.handleCcField(); }, this); + this.handleBccField(); + this.listenTo(this.model, 'change:bcc', function () { + this.handleBccField(); + }, this); }, send: function () {