This commit is contained in:
Yuri Kuznetsov
2022-10-12 12:39:36 +03:00
parent 50d7f6d831
commit 84d9e1fe29
5 changed files with 18 additions and 23 deletions
@@ -26,13 +26,10 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.define('views/email-filter/record/detail-small', 'views/email-filter/record/detail', function (Dep) {
define('views/email-filter/record/detail-small', ['views/email-filter/record/detail'], function (Dep) {
return Dep.extend({
bottomView: null
bottomView: null,
});
});
+10 -9
View File
@@ -26,19 +26,22 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.define('views/email-filter/record/detail', 'views/record/detail', function (Dep) {
define('views/email-filter/record/detail', ['views/record/detail'], function (Dep) {
return Dep.extend({
setup: function () {
Dep.prototype.setup.call(this);
this.setupFilterFields();
},
setupFilterFields: function () {
this.controlIsGlobal();
this.listenTo(this.model, 'change:isGlobal', function (model, value, data) {
this.listenTo(this.model, 'change:isGlobal', (model, value, data) => {
this.controlIsGlobal();
if (data.ui) {
if (model.get('isGlobal')) {
this.model.set({
@@ -52,7 +55,7 @@ Espo.define('views/email-filter/record/detail', 'views/record/detail', function
this.model.set('parentName', this.getUser().get('name'));
}
}
}, this);
});
if (!this.getUser().isAdmin()) {
this.setFieldReadOnly('parent');
@@ -77,9 +80,10 @@ Espo.define('views/email-filter/record/detail', 'views/record/detail', function
this.controlEmailFolder();
this.listenTo(this.model, 'change', function () {
this.listenTo(this.model, 'change', () => {
this.controlEmailFolder();
}, this);
});
},
controlIsGlobal: function () {
@@ -96,9 +100,6 @@ Espo.define('views/email-filter/record/detail', 'views/record/detail', function
} else {
this.showField('emailFolder');
}
}
},
});
});
@@ -26,13 +26,11 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.define('views/email-filter/record/edit-small', 'views/email-filter/record/edit', function (Dep) {
define('views/email-filter/record/edit-small', ['views/email-filter/record/edit'], function (Dep) {
return Dep.extend({
bottomView: null
bottomView: null,
});
});
+4 -4
View File
@@ -26,7 +26,9 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.define('views/email-filter/record/edit', ['views/record/edit', 'views/email-filter/record/detail'], function (Dep, Detail) {
define('views/email-filter/record/edit',
['views/record/edit', 'views/email-filter/record/detail'],
function (Dep, Detail) {
return Dep.extend({
@@ -41,9 +43,7 @@ Espo.define('views/email-filter/record/edit', ['views/record/edit', 'views/email
controlEmailFolder: function () {
Detail.prototype.controlEmailFolder.call(this);
}
},
});
});
@@ -31,7 +31,6 @@ define('views/email-filter/record/list', ['views/record/list'], function (Dep) {
return Dep.extend({
massActionList: ['remove', 'export'],
});
});