fix campaign

This commit is contained in:
yuri
2015-09-21 12:38:26 +03:00
parent e2b9647cf1
commit 53e6904ce1
2 changed files with 2 additions and 15 deletions
@@ -61,12 +61,12 @@ Espo.define('crm:views/campaign/record/detail-bottom', 'views/record/detail-bott
manageMassEmails: function () {
var parentView = this.getParentView();
if (!parentView) return;
if (this.model.get('type') == 'Email') {
if (~['Email', 'Newsletter'].indexOf(this.model.get('type'))) {
parentView.showPanel('massEmails');
parentView.showPanel('trackingUrls');
} else {
parentView.hidePanel('massEmails');
parentView.showPanel('trackingUrls');
parentView.hidePanel('trackingUrls');
}
}
@@ -28,21 +28,8 @@ Espo.define('crm:views/campaign/record/detail', 'views/record/detail', function
bottomView: 'crm:views/campaign/record/detail-bottom',
handleStatisticsPanelAppearance: function() {
if (this.model.get('status') == 'Planning') {
this.hidePanel('statistics');
} else {
this.showPanel('statistics');
}
},
afterRender: function () {
Dep.prototype.afterRender.call(this);
this.handleStatisticsPanelAppearance();
this.listenTo(this.model, 'change:status', function () {
this.handleStatisticsPanelAppearance();
}, this);
},
});