mirror of
https://github.com/espocrm/espocrm.git
synced 2026-07-01 08:26:04 +00:00
ref
This commit is contained in:
@@ -125,10 +125,7 @@ define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], function (D
|
||||
this.allDayScopeList = this.getMetadata()
|
||||
.get('clientDefs.Calendar.allDayScopeList') || this.allDayScopeList;
|
||||
|
||||
this.colors = _.extend(
|
||||
this.colors,
|
||||
Espo.Utils.clone(this.getHelper().themeManager.getParam('calendarColors') || {}),
|
||||
);
|
||||
this.colors = {...this.colors, ...this.getHelper().themeManager.getParam('calendarColors')};
|
||||
|
||||
this.scopeFilter = false;
|
||||
|
||||
|
||||
@@ -56,9 +56,9 @@ define('crm:views/calendar/modals/edit', ['views/modals/edit'], function (Dep) {
|
||||
this.getModelFactory().create(this.scope, model => {
|
||||
model.populateDefaults();
|
||||
|
||||
var attributes = this.getRecordView().fetch();
|
||||
let attributes = this.getRecordView().fetch();
|
||||
|
||||
attributes = _.extend(attributes, this.getRecordView().model.getClonedAttributes());
|
||||
attributes = {...attributes, ...this.getRecordView().model.getClonedAttributes()};
|
||||
|
||||
this.filterAttributesForEntityType(attributes, scope);
|
||||
|
||||
|
||||
@@ -139,10 +139,7 @@ define('crm:views/calendar/timeline', ['view', 'lib!vis'], function (Dep, Vis) {
|
||||
this.allDayScopeList = this.getMetadata()
|
||||
.get('clientDefs.Calendar.allDayScopeList') || this.allDayScopeList || [];
|
||||
|
||||
this.colors = _.extend(
|
||||
this.colors,
|
||||
Espo.Utils.clone(this.getHelper().themeManager.getParam('calendarColors') || {}),
|
||||
);
|
||||
this.colors = {...this.colors, ...this.getHelper().themeManager.getParam('calendarColors')};
|
||||
|
||||
this.isCustomViewAvailable = this.getAcl().get('userPermission') !== 'no';
|
||||
|
||||
|
||||
@@ -48,13 +48,9 @@ define('crm:views/scheduler/scheduler', ['view', 'lib!vis'], function (Dep, Vis)
|
||||
this.endField = this.options.endField || 'dateEnd';
|
||||
this.assignedUserField = this.options.assignedUserField || 'assignedUser';
|
||||
|
||||
this.colors = Espo.Utils.clone(
|
||||
this.getMetadata().get('clientDefs.Calendar.colors') || {});
|
||||
this.colors = Espo.Utils.clone(this.getMetadata().get('clientDefs.Calendar.colors') || {});
|
||||
|
||||
this.colors = _.extend(
|
||||
this.colors,
|
||||
Espo.Utils.clone(this.getHelper().themeManager.getParam('calendarColors') || {}),
|
||||
);
|
||||
this.colors = {...this.colors, ...this.getHelper().themeManager.getParam('calendarColors')};
|
||||
|
||||
let usersFieldDefault = 'users';
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@ class AdminController extends Controller {
|
||||
let page = options.page;
|
||||
|
||||
if (options.options) {
|
||||
options = _.extend(
|
||||
Espo.Utils.parseUrlOptionsParam(options.options),
|
||||
options
|
||||
);
|
||||
options = {
|
||||
...Espo.Utils.parseUrlOptionsParam(options.options),
|
||||
...options,
|
||||
};
|
||||
|
||||
delete options.options;
|
||||
}
|
||||
|
||||
@@ -727,10 +727,11 @@ class ListView extends MainView {
|
||||
|
||||
this.prepareCreateReturnDispatchParams(returnDispatchParams);
|
||||
|
||||
_.extend(options, {
|
||||
options = {
|
||||
...options,
|
||||
returnUrl: this.getRouter().getCurrentUrl(),
|
||||
returnDispatchParams: returnDispatchParams,
|
||||
});
|
||||
};
|
||||
|
||||
return this.createView('quickCreate', viewName, options, (view) => {
|
||||
view.render();
|
||||
@@ -773,10 +774,11 @@ class ListView extends MainView {
|
||||
|
||||
this.prepareCreateReturnDispatchParams(returnDispatchParams);
|
||||
|
||||
_.extend(options, {
|
||||
options = {
|
||||
...options,
|
||||
returnUrl: this.getRouter().getCurrentUrl(),
|
||||
returnDispatchParams: returnDispatchParams
|
||||
});
|
||||
returnDispatchParams: returnDispatchParams,
|
||||
};
|
||||
|
||||
router.navigate(url, {trigger: false});
|
||||
router.dispatch(this.scope, 'create', options);
|
||||
|
||||
@@ -352,7 +352,7 @@ class EditModalView extends ModalView {
|
||||
attributes = this.getRecordView().fetch();
|
||||
model = this.getRecordView().model;
|
||||
|
||||
attributes = _.extend(attributes, model.getClonedAttributes());
|
||||
attributes = {...attributes, ...model.getClonedAttributes()};
|
||||
|
||||
options = {
|
||||
attributes: attributes,
|
||||
@@ -376,7 +376,7 @@ class EditModalView extends ModalView {
|
||||
attributes = this.getRecordView().fetch();
|
||||
model = this.getRecordView().model;
|
||||
|
||||
attributes = _.extend(attributes, model.getClonedAttributes());
|
||||
attributes = {...attributes, ...model.getClonedAttributes()};
|
||||
|
||||
options = {
|
||||
attributes: attributes,
|
||||
|
||||
@@ -1200,7 +1200,7 @@ class BaseRecordView extends View {
|
||||
}
|
||||
|
||||
if (!view.disabled && !view.readOnly && view.isFullyRendered()) {
|
||||
_.extend(data, view.fetch());
|
||||
data = {...data, ...view.fetch()};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user