diff --git a/client/src/views/action-history-record/fields/target-type.js b/client/src/views/action-history-record/fields/target-type.js
index b28618f386..14a216992e 100644
--- a/client/src/views/action-history-record/fields/target-type.js
+++ b/client/src/views/action-history-record/fields/target-type.js
@@ -26,14 +26,13 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/action-history-record/fields/target-type', 'views/fields/enum', function (Dep) {
+define('views/action-history-record/fields/target-type', ['views/fields/enum'], function (Dep) {
return Dep.extend({
setupOptions: function () {
Dep.prototype.setupOptions.call(this);
this.params.options = this.getMetadata().getScopeEntityList();
- }
-
+ },
});
});
diff --git a/client/src/views/action-history-record/fields/target.js b/client/src/views/action-history-record/fields/target.js
index a1bcff9d7e..9ad5236b38 100644
--- a/client/src/views/action-history-record/fields/target.js
+++ b/client/src/views/action-history-record/fields/target.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/action-history-record/fields/target', 'views/fields/link-parent', function (Dep) {
+define('views/action-history-record/fields/target', ['views/fields/link-parent'], function (Dep) {
return Dep.extend({
@@ -37,23 +37,27 @@ Espo.define('views/action-history-record/fields/target', 'views/fields/link-pare
setup: function () {
Dep.prototype.setup.call(this);
- var scopes = this.getMetadata().get('scopes') || {};
- this.foreignScopeList = this.getMetadata().getScopeEntityList().filter(function (item) {
-
+ this.foreignScopeList = this.getMetadata().getScopeEntityList().filter(item => {
if (!this.getUser().isAdmin()) {
- if (!this.getAcl().checkScopeHasAcl(item)) return;
+ if (!this.getAcl().checkScopeHasAcl(item)) {
+ return;
+ }
}
- if (~this.ignoreScopeList.indexOf(item)) return;
- if (!this.getAcl().checkScope(item)) return;
+ if (~this.ignoreScopeList.indexOf(item)) {
+ return;
+ }
+
+ if (!this.getAcl().checkScope(item)) {
+ return;
+ }
return true;
- }, this);
+ });
this.getLanguage().sortEntityList(this.foreignScopeList);
this.foreignScope = this.model.get(this.typeName) || this.foreignScopeList[0];
- }
-
+ },
});
});
diff --git a/client/src/views/action-history-record/modals/detail.js b/client/src/views/action-history-record/modals/detail.js
index 9ef345a7c9..48df6c6813 100644
--- a/client/src/views/action-history-record/modals/detail.js
+++ b/client/src/views/action-history-record/modals/detail.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/action-history-record/modals/detail', ['views/modals/detail'], function (Dep) {
+define('views/action-history-record/modals/detail', ['views/modals/detail'], function (Dep) {
return Dep.extend({
@@ -34,8 +34,7 @@ Espo.define('views/action-history-record/modals/detail', ['views/modals/detail']
editDisabled: true,
- sideDisabled: true
-
+ sideDisabled: true,
});
});
diff --git a/client/src/views/action-history-record/record/list.js b/client/src/views/action-history-record/record/list.js
index 78104c721e..9f2b924a2b 100644
--- a/client/src/views/action-history-record/record/list.js
+++ b/client/src/views/action-history-record/record/list.js
@@ -26,14 +26,12 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/action-history-record/record/list', 'views/record/list', function (Dep) {
+define('views/action-history-record/record/list', ['views/record/list'], function (Dep) {
return Dep.extend({
rowActionsView: 'views/record/row-actions/view-and-remove',
- massActionList: ['remove', 'export']
-
+ massActionList: ['remove', 'export'],
});
});
-
diff --git a/client/src/views/admin/auth-log-record/list.js b/client/src/views/admin/auth-log-record/list.js
index faadfb01c8..e5207726dc 100644
--- a/client/src/views/admin/auth-log-record/list.js
+++ b/client/src/views/admin/auth-log-record/list.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/auth-log-record/list', 'views/list', function (Dep) {
+define('views/admin/auth-log-record/list', ['views/list'], function (Dep) {
return Dep.extend({
@@ -35,14 +35,17 @@ Espo.define('views/admin/auth-log-record/list', 'views/list', function (Dep) {
},
getHeader: function () {
- return '' + this.translate('Administration') + '' +
- ' ' +
- this.getLanguage().translate('Auth Log', 'labels', 'Admin');
+ return this.buildHeaderHtml([
+ $('')
+ .attr('href', '#Admin')
+ .text(this.translate('Administration')),
+ $('')
+ .text(this.getLanguage().translate('Auth Log', 'labels', 'Admin')),
+ ]);
},
updatePageTitle: function () {
this.setPageTitle(this.getLanguage().translate('Auth Log', 'labels', 'Admin'));
- }
+ },
});
});
-
diff --git a/client/src/views/admin/auth-log-record/modals/detail.js b/client/src/views/admin/auth-log-record/modals/detail.js
index 1fd8f4242d..d3c9d77610 100644
--- a/client/src/views/admin/auth-log-record/modals/detail.js
+++ b/client/src/views/admin/auth-log-record/modals/detail.js
@@ -26,13 +26,12 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/auth-log-record/modals/detail', ['views/modals/detail'], function (Dep) {
+define('views/admin/auth-log-record/modals/detail', ['views/modals/detail'], function (Dep) {
return Dep.extend({
sideDisabled: true,
- editDisabled: true
-
+ editDisabled: true,
});
});
diff --git a/client/src/views/admin/auth-log-record/record/detail-small.js b/client/src/views/admin/auth-log-record/record/detail-small.js
index baf3ef4d27..ae409d2061 100644
--- a/client/src/views/admin/auth-log-record/record/detail-small.js
+++ b/client/src/views/admin/auth-log-record/record/detail-small.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/auth-log-record/record/detail-small', 'views/record/detail-small', function (Dep) {
+define('views/admin/auth-log-record/record/detail-small', ['views/record/detail-small'], function (Dep) {
return Dep.extend({
@@ -34,7 +34,6 @@ Espo.define('views/admin/auth-log-record/record/detail-small', 'views/record/det
isWide: true,
- bottomView: 'views/record/detail-bottom'
-
+ bottomView: 'views/record/detail-bottom',
});
});
diff --git a/client/src/views/admin/auth-log-record/record/detail.js b/client/src/views/admin/auth-log-record/record/detail.js
index 0f9ce6f861..53d3d9247b 100644
--- a/client/src/views/admin/auth-log-record/record/detail.js
+++ b/client/src/views/admin/auth-log-record/record/detail.js
@@ -26,13 +26,12 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/auth-log-record/record/detail', 'views/record/detail', function (Dep) {
+define('views/admin/auth-log-record/record/detail', ['views/record/detail'], function (Dep) {
return Dep.extend({
sideDisabled: true,
- readOnly: true
-
+ readOnly: true,
});
});
diff --git a/client/src/views/admin/auth-log-record/record/list.js b/client/src/views/admin/auth-log-record/record/list.js
index ffb16a130d..deb5d65c00 100644
--- a/client/src/views/admin/auth-log-record/record/list.js
+++ b/client/src/views/admin/auth-log-record/record/list.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/auth-log-record/record/list', 'views/record/list', function (Dep) {
+define('views/admin/auth-log-record/record/list', ['views/record/list'], function (Dep) {
return Dep.extend({
@@ -34,7 +34,6 @@ Espo.define('views/admin/auth-log-record/record/list', 'views/record/list', func
massActionList: ['remove'],
- checkAllResultMassActionList: ['remove']
-
+ checkAllResultMassActionList: ['remove'],
});
});
diff --git a/client/src/views/admin/auth-token/modals/detail.js b/client/src/views/admin/auth-token/modals/detail.js
index b428bfdd95..960b65689b 100644
--- a/client/src/views/admin/auth-token/modals/detail.js
+++ b/client/src/views/admin/auth-token/modals/detail.js
@@ -26,13 +26,12 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/auth-token/modals/detail', ['views/modals/detail'], function (Dep) {
+define('views/admin/auth-token/modals/detail', ['views/modals/detail'], function (Dep) {
return Dep.extend({
sideDisabled: true,
- editDisabled: true
-
+ editDisabled: true,
});
});
diff --git a/client/src/views/admin/auth-token/record/detail-small.js b/client/src/views/admin/auth-token/record/detail-small.js
index 97271c7be1..2581340b3f 100644
--- a/client/src/views/admin/auth-token/record/detail-small.js
+++ b/client/src/views/admin/auth-token/record/detail-small.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/auth-token/record/detail-small', 'views/record/detail-small', function (Dep) {
+define('views/admin/auth-token/record/detail-small', ['views/record/detail-small'], function (Dep) {
return Dep.extend({
@@ -34,8 +34,6 @@ Espo.define('views/admin/auth-token/record/detail-small', 'views/record/detail-s
isWide: true,
- bottomView: 'views/record/detail-bottom'
-
+ bottomView: 'views/record/detail-bottom',
});
});
-
diff --git a/client/src/views/admin/auth-token/record/detail.js b/client/src/views/admin/auth-token/record/detail.js
index ffef0f9f6d..f528e22864 100644
--- a/client/src/views/admin/auth-token/record/detail.js
+++ b/client/src/views/admin/auth-token/record/detail.js
@@ -26,14 +26,12 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/auth-token/record/detail', 'views/record/detail', function (Dep) {
+define('views/admin/auth-token/record/detail', ['views/record/detail'], function (Dep) {
return Dep.extend({
sideDisabled: true,
- readOnly: true
-
+ readOnly: true,
});
});
-
diff --git a/client/src/views/admin/auth-token/record/list.js b/client/src/views/admin/auth-token/record/list.js
index ced1ef44bc..7e8f404b75 100644
--- a/client/src/views/admin/auth-token/record/list.js
+++ b/client/src/views/admin/auth-token/record/list.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-define('views/admin/auth-token/record/list', 'views/record/list', function (Dep) {
+define('views/admin/auth-token/record/list', ['views/record/list'], function (Dep) {
return Dep.extend({
@@ -37,45 +37,47 @@ define('views/admin/auth-token/record/list', 'views/record/list', function (Dep)
checkAllResultMassActionList: ['remove', 'setInactive'],
massActionSetInactive: function () {
- var ids = false;
- var allResultIsChecked = this.allResultIsChecked;
+ let ids = null;
+ let allResultIsChecked = this.allResultIsChecked;
if (!allResultIsChecked) {
ids = this.checkedList;
}
- var attributes = {
- isActive: false
+ let attributes = {
+ isActive: false,
};
- var ids = false;
+ Espo.Ajax
+ .postRequest('MassAction', {
+ action: 'update',
+ entityType: this.entityType,
+ params: {
+ ids: ids || null,
+ where: (!ids || ids.length === 0) ? this.collection.getWhere() : null,
+ searchParams: (!ids || ids.length === 0) ? this.collection.data : null,
+ },
+ data: attributes,
+ })
+ .then(() => {
+ this.collection
+ .fetch()
+ .then(() => {
+ Espo.Ui.success(this.translate('Done'));
- var allResultIsChecked = this.allResultIsChecked;
-
- if (!allResultIsChecked) {
- ids = this.checkedList;
- }
-
- Espo.Ajax.postRequest('MassAction', {
- action: 'update',
- entityType: this.entityType,
- params: {
- ids: ids || null,
- where: (!ids || ids.length === 0) ? this.collection.getWhere() : null,
- searchParams: (!ids || ids.length === 0) ? this.collection.data : null,
- },
- data: attributes,
- }).then(() => {
- var result = result || {};
-
- this.collection.fetch();
- });
+ if (ids) {
+ ids.forEach(id => {
+ this.checkRecord(id);
+ });
+ }
+ });
+ });
},
actionSetInactive: function (data) {
if (!data.id) {
return;
- };
+ }
var model = this.collection.get(data.id);
@@ -86,14 +88,10 @@ define('views/admin/auth-token/record/list', 'views/record/list', function (Dep)
Espo.Ui.notify(this.translate('pleaseWait', 'messages'));
model
- .save({
- 'isActive': false
- }, {patch: true})
+ .save({'isActive': false}, {patch: true})
.then(() => {
Espo.Ui.notify(false);
});
- }
-
+ },
});
});
-
diff --git a/client/src/views/admin/auth-token/record/row-actions/default.js b/client/src/views/admin/auth-token/record/row-actions/default.js
index 0a03c010b4..85b9d55f26 100644
--- a/client/src/views/admin/auth-token/record/row-actions/default.js
+++ b/client/src/views/admin/auth-token/record/row-actions/default.js
@@ -26,29 +26,30 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/auth-token/record/row-actions/default', 'views/record/row-actions/default', function (Dep) {
+define('views/admin/auth-token/record/row-actions/default', ['views/record/row-actions/default'], function (Dep) {
return Dep.extend({
setup: function () {
Dep.prototype.setup.call(this);
- this.listenTo(this.model, 'change:isActive', function () {
- setTimeout(function () {
+
+ this.listenTo(this.model, 'change:isActive', () => {
+ setTimeout(() => {
this.reRender();
- }.bind(this), 10);
- }, this);
+ }, 10);
+ });
},
getActionList: function () {
var list = [];
- list.push({
- action: 'quickView',
- label: 'View',
- data: {
- id: this.model.id
- }
- });
+ list.push({
+ action: 'quickView',
+ label: 'View',
+ data: {
+ id: this.model.id
+ }
+ });
if (this.model.get('isActive')) {
list.push({
@@ -59,6 +60,7 @@ Espo.define('views/admin/auth-token/record/row-actions/default', 'views/record/r
}
});
}
+
list.push({
action: 'quickRemove',
label: 'Remove',
@@ -66,10 +68,8 @@ Espo.define('views/admin/auth-token/record/row-actions/default', 'views/record/r
id: this.model.id
}
});
+
return list;
- }
+ },
});
-
});
-
-
diff --git a/client/src/views/admin/dynamic-logic/conditions/and.js b/client/src/views/admin/dynamic-logic/conditions/and.js
index 1b78c91568..f53a7d6d83 100644
--- a/client/src/views/admin/dynamic-logic/conditions/and.js
+++ b/client/src/views/admin/dynamic-logic/conditions/and.js
@@ -26,13 +26,10 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/dynamic-logic/conditions/and', 'views/admin/dynamic-logic/conditions/group-base', function (Dep) {
+define('views/admin/dynamic-logic/conditions/and', ['views/admin/dynamic-logic/conditions/group-base'], function (Dep) {
return Dep.extend({
- operator: 'and'
-
+ operator: 'and',
});
-
});
-
diff --git a/client/src/views/admin/dynamic-logic/conditions/field-types/base.js b/client/src/views/admin/dynamic-logic/conditions/field-types/base.js
index 05539c6ef1..d0f0e12217 100644
--- a/client/src/views/admin/dynamic-logic/conditions/field-types/base.js
+++ b/client/src/views/admin/dynamic-logic/conditions/field-types/base.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-define('views/admin/dynamic-logic/conditions/field-types/base', 'view', function (Dep) {
+define('views/admin/dynamic-logic/conditions/field-types/base', ['view'], function (Dep) {
return Dep.extend({
@@ -179,6 +179,5 @@ define('views/admin/dynamic-logic/conditions/field-types/base', 'view', function
return item;
},
-
});
});
diff --git a/client/src/views/admin/dynamic-logic/conditions/field-types/date.js b/client/src/views/admin/dynamic-logic/conditions/field-types/date.js
index d1cc62af34..b71f171866 100644
--- a/client/src/views/admin/dynamic-logic/conditions/field-types/date.js
+++ b/client/src/views/admin/dynamic-logic/conditions/field-types/date.js
@@ -26,12 +26,10 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/dynamic-logic/conditions/field-types/date', 'views/admin/dynamic-logic/conditions/field-types/base', function (Dep) {
+define('views/admin/dynamic-logic/conditions/field-types/date',
+['views/admin/dynamic-logic/conditions/field-types/base'], function (Dep) {
return Dep.extend({
-
});
-
});
-
diff --git a/client/src/views/admin/dynamic-logic/conditions/field-types/enum.js b/client/src/views/admin/dynamic-logic/conditions/field-types/enum.js
index be2f71e9d0..f0dedb244e 100644
--- a/client/src/views/admin/dynamic-logic/conditions/field-types/enum.js
+++ b/client/src/views/admin/dynamic-logic/conditions/field-types/enum.js
@@ -26,7 +26,8 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/dynamic-logic/conditions/field-types/enum', 'views/admin/dynamic-logic/conditions/field-types/base', function (Dep) {
+define('views/admin/dynamic-logic/conditions/field-types/enum',
+['views/admin/dynamic-logic/conditions/field-types/base'], function (Dep) {
return Dep.extend({
@@ -35,7 +36,7 @@ Espo.define('views/admin/dynamic-logic/conditions/field-types/enum', 'views/admi
var item = {
type: this.type,
- attribute: this.field
+ attribute: this.field,
};
if (valueView) {
@@ -55,8 +56,5 @@ Espo.define('views/admin/dynamic-logic/conditions/field-types/enum', 'views/admi
return viewName;
},
-
});
-
});
-
diff --git a/client/src/views/admin/dynamic-logic/conditions/field-types/link-multiple.js b/client/src/views/admin/dynamic-logic/conditions/field-types/link-multiple.js
index 76a6ba2033..5a035bfa38 100644
--- a/client/src/views/admin/dynamic-logic/conditions/field-types/link-multiple.js
+++ b/client/src/views/admin/dynamic-logic/conditions/field-types/link-multiple.js
@@ -26,10 +26,8 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-define(
- 'views/admin/dynamic-logic/conditions/field-types/link-multiple',
- 'views/admin/dynamic-logic/conditions/field-types/base',
- function (Dep) {
+define('views/admin/dynamic-logic/conditions/field-types/link-multiple',
+['views/admin/dynamic-logic/conditions/field-types/base'], function (Dep) {
return Dep.extend({
@@ -95,6 +93,5 @@ define(
return item;
},
-
});
});
diff --git a/client/src/views/admin/dynamic-logic/conditions/field-types/link-parent.js b/client/src/views/admin/dynamic-logic/conditions/field-types/link-parent.js
index 56dd182e54..fd7ff0ac3c 100644
--- a/client/src/views/admin/dynamic-logic/conditions/field-types/link-parent.js
+++ b/client/src/views/admin/dynamic-logic/conditions/field-types/link-parent.js
@@ -26,7 +26,8 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/dynamic-logic/conditions/field-types/link-parent', 'views/admin/dynamic-logic/conditions/field-types/base', function (Dep) {
+define('views/admin/dynamic-logic/conditions/field-types/link-parent',
+['views/admin/dynamic-logic/conditions/field-types/base'], function (Dep) {
return Dep.extend({
@@ -41,6 +42,7 @@ Espo.define('views/admin/dynamic-logic/conditions/field-types/link-parent', 'vie
if (this.type === 'equals' || this.type === 'notEquals') {
var values = {};
+
values[this.field + 'Id'] = valueView.model.get(this.field + 'Id');
values[this.field + 'Name'] = valueView.model.get(this.field + 'Name');
values[this.field + 'Type'] = valueView.model.get(this.field + 'Type');
@@ -99,9 +101,6 @@ Espo.define('views/admin/dynamic-logic/conditions/field-types/link-parent', 'vie
}
return item;
- }
-
+ },
});
-
});
-
diff --git a/client/src/views/admin/dynamic-logic/conditions/field-types/link.js b/client/src/views/admin/dynamic-logic/conditions/field-types/link.js
index 0efa51bff2..31eef0ec68 100644
--- a/client/src/views/admin/dynamic-logic/conditions/field-types/link.js
+++ b/client/src/views/admin/dynamic-logic/conditions/field-types/link.js
@@ -26,7 +26,8 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/dynamic-logic/conditions/field-types/link', 'views/admin/dynamic-logic/conditions/field-types/base', function (Dep) {
+define('views/admin/dynamic-logic/conditions/field-types/link',
+['views/admin/dynamic-logic/conditions/field-types/base'], function (Dep) {
return Dep.extend({
@@ -51,9 +52,6 @@ Espo.define('views/admin/dynamic-logic/conditions/field-types/link', 'views/admi
}
return item;
- }
-
+ },
});
-
});
-
diff --git a/client/src/views/admin/dynamic-logic/conditions/field-types/multi-enum.js b/client/src/views/admin/dynamic-logic/conditions/field-types/multi-enum.js
index 5292915d18..36202291a7 100644
--- a/client/src/views/admin/dynamic-logic/conditions/field-types/multi-enum.js
+++ b/client/src/views/admin/dynamic-logic/conditions/field-types/multi-enum.js
@@ -26,7 +26,8 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/dynamic-logic/conditions/field-types/multi-enum', 'views/admin/dynamic-logic/conditions/field-types/base', function (Dep) {
+define('views/admin/dynamic-logic/conditions/field-types/multi-enum',
+['views/admin/dynamic-logic/conditions/field-types/base'], function (Dep) {
return Dep.extend({
@@ -55,8 +56,5 @@ Espo.define('views/admin/dynamic-logic/conditions/field-types/multi-enum', 'view
return viewName;
},
-
});
-
});
-
diff --git a/client/src/views/admin/dynamic-logic/conditions/group-base.js b/client/src/views/admin/dynamic-logic/conditions/group-base.js
index dfb9917356..14e4ea82df 100644
--- a/client/src/views/admin/dynamic-logic/conditions/group-base.js
+++ b/client/src/views/admin/dynamic-logic/conditions/group-base.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-define('views/admin/dynamic-logic/conditions/group-base', 'view', function (Dep) {
+define('views/admin/dynamic-logic/conditions/group-base', ['view'], function (Dep) {
return Dep.extend({
diff --git a/client/src/views/admin/dynamic-logic/conditions/not.js b/client/src/views/admin/dynamic-logic/conditions/not.js
index f94f348cb5..20fb2a18df 100644
--- a/client/src/views/admin/dynamic-logic/conditions/not.js
+++ b/client/src/views/admin/dynamic-logic/conditions/not.js
@@ -26,7 +26,7 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/dynamic-logic/conditions/not', 'views/admin/dynamic-logic/conditions/group-base', function (Dep) {
+define('views/admin/dynamic-logic/conditions/not', ['views/admin/dynamic-logic/conditions/group-base'], function (Dep) {
return Dep.extend({
@@ -40,7 +40,7 @@ Espo.define('views/admin/dynamic-logic/conditions/not', 'views/admin/dynamic-log
operator: this.operator,
hasItem: this.hasView(this.viewKey),
level: this.level,
- groupOperator: this.getGroupOperator()
+ groupOperator: this.getGroupOperator(),
};
},
@@ -68,6 +68,7 @@ Espo.define('views/admin/dynamic-logic/conditions/not', 'views/admin/dynamic-log
getKey: function () {
var i = 0;
+
return 'view-' + this.level.toString() + '-' + this.number.toString() + '-' + i.toString();
},
@@ -75,26 +76,25 @@ Espo.define('views/admin/dynamic-logic/conditions/not', 'views/admin/dynamic-log
return 0;
},
- addItemContainer: function () {
- },
+ addItemContainer: function () {},
- addViewDataListItem: function () {
- },
+ addViewDataListItem: function () {},
fetch: function () {
var view = this.getView(this.viewKey);
- if (!view) return {
- type: 'and',
- value: []
- };
+
+ if (!view) {
+ return {
+ type: 'and',
+ value: [],
+ };
+ }
var value = view.fetch();
- console.log(value);
-
return {
type: this.operator,
- value: value
+ value: value,
};
},
@@ -104,9 +104,6 @@ Espo.define('views/admin/dynamic-logic/conditions/not', 'views/admin/dynamic-log
} else {
this.$el.find(' > .group-bottom').removeClass('hidden');
}
- }
-
+ },
});
-
});
-
diff --git a/client/src/views/admin/dynamic-logic/conditions/or.js b/client/src/views/admin/dynamic-logic/conditions/or.js
index a54d1f3985..68c1ef9999 100644
--- a/client/src/views/admin/dynamic-logic/conditions/or.js
+++ b/client/src/views/admin/dynamic-logic/conditions/or.js
@@ -26,13 +26,10 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
-Espo.define('views/admin/dynamic-logic/conditions/or', 'views/admin/dynamic-logic/conditions/group-base', function (Dep) {
+define('views/admin/dynamic-logic/conditions/or', ['views/admin/dynamic-logic/conditions/group-base'], function (Dep) {
return Dep.extend({
- operator: 'or'
-
+ operator: 'or',
});
-
});
-