layout impr

This commit is contained in:
Yuri Kuznetsov
2023-07-10 15:55:05 +03:00
parent 8f574b1275
commit 52f1329ca4
+17 -2
View File
@@ -120,7 +120,7 @@ class LayoutIndexView extends View {
let scope = $(e.target).data('scope');
let type = $(e.target).data('type');
if (this.getView('content')) {
if (this.getContentView()) {
if (this.scope === scope && this.type === type) {
return;
}
@@ -140,6 +140,21 @@ class LayoutIndexView extends View {
onItemHeaderClick(e) {
e.preventDefault();
if (this.em) {
if (!this.getContentView()) {
return;
}
this.getRouter().checkConfirmLeaveOut(() => {
this.clearView('content');
this.type = null;
this.renderDefaultPage();
});
return;
}
let $target = $(e.target);
let scope = $target.data('scope');
let $collapse = $('.collapse[data-scope="' + scope + '"]');
@@ -190,7 +205,7 @@ class LayoutIndexView extends View {
scope: scope,
type: type,
setId: this.setId,
}, (view) => {
}, view => {
this.renderLayoutHeader();
view.render();
Espo.Ui.notify(false);