mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
Fix modifyDetailLayout
This commit is contained in:
@@ -68,6 +68,8 @@ class AdminAuthenticationRecordView extends SettingsEditRecordView {
|
||||
panels: {},
|
||||
}
|
||||
|
||||
hasModifyDetailLayout = true
|
||||
|
||||
setup() {
|
||||
this.methodList = [];
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ export default class extends DetailRecordView {
|
||||
*/
|
||||
helper
|
||||
|
||||
hasModifyDetailLayout = true
|
||||
|
||||
setup() {
|
||||
this.helper = new Helper(this);
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ export default class extends EditRecordView {
|
||||
*/
|
||||
helper
|
||||
|
||||
hasModifyDetailLayout = true;
|
||||
|
||||
setup() {
|
||||
this.helper = new Helper(this);
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ import DetailRecordView from 'views/record/detail';
|
||||
|
||||
export default class extends DetailRecordView {
|
||||
|
||||
hasModifyDetailLayout = true
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ import Detail from 'views/email-account/record/detail';
|
||||
|
||||
export default class extends EditRecordView {
|
||||
|
||||
hasModifyDetailLayout = true
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@ import DetailRecordView from 'views/record/detail';
|
||||
|
||||
export default class extends DetailRecordView {
|
||||
|
||||
hasModifyDetailLayout = true
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ import Detail from 'views/inbound-email/record/detail';
|
||||
|
||||
export default class extends EditRecordView {
|
||||
|
||||
hasModifyDetailLayout = true
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
|
||||
|
||||
@@ -691,15 +691,18 @@ class DetailRecordView<S extends DetailRecordViewSchema = DetailRecordViewSchema
|
||||
|
||||
private underShowMoreDetailPanelList: string[]
|
||||
|
||||
private modifyDetailLayout: ((items: any[]) => void) | undefined = undefined
|
||||
|
||||
private recordUpdateWebSocketTopic: string
|
||||
|
||||
private isSubscribedToWebSocket: boolean = false
|
||||
|
||||
private updateWebSocketIsBlocked: boolean = false
|
||||
|
||||
private _hasMiddleTabs: boolean;
|
||||
private _hasMiddleTabs: boolean
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected hasModifyDetailLayout: boolean = false
|
||||
|
||||
/**
|
||||
* A shortcut-key => action map.
|
||||
@@ -3000,7 +3003,7 @@ class DetailRecordView<S extends DetailRecordViewSchema = DetailRecordViewSchema
|
||||
}
|
||||
|
||||
this.getHelper().layoutManager.get(this.entityType, this.layoutName, (detailLayout: any) => {
|
||||
if (typeof this.modifyDetailLayout === 'function') {
|
||||
if (this.hasModifyDetailLayout) {
|
||||
detailLayout = Utils.cloneDeep(detailLayout);
|
||||
|
||||
this.modifyDetailLayout(detailLayout);
|
||||
@@ -3836,6 +3839,14 @@ class DetailRecordView<S extends DetailRecordViewSchema = DetailRecordViewSchema
|
||||
this.getButtonsView()?.reRender({buffer: true});
|
||||
this.getEditButtonsView()?.reRender({buffer: true});
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
protected modifyDetailLayout(layout: any) {
|
||||
// noinspection BadExpressionStatementJS
|
||||
layout;
|
||||
}
|
||||
}
|
||||
|
||||
export default DetailRecordView;
|
||||
|
||||
Reference in New Issue
Block a user