bottom layout compatibility fixes

This commit is contained in:
Yuri Kuznetsov
2020-04-02 17:44:13 +03:00
parent 28c77b2890
commit 8a2c0853c2
2 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ class Layout extends \Espo\Core\Services\Base
if (!is_object($item)) continue;
$item = clone $item;
$item->order = 5 + 0.001 * $i;
$item->index = 5 + 0.001 * $i;
if (!isset($item->name)) continue;
+9 -1
View File
@@ -49,6 +49,14 @@ define('views/record/detail-bottom', 'views/record/panels-container', function (
this.getMetadata().get(['clientDefs', scope, 'bottomPanels', this.type]) || this.panelList || []
);
this.panelList.forEach(function (item) {
if ('index' in item) {
item.index = item.index;
} else if ('order' in item) {
item.index = item.order;
}
});
if (this.streamPanel && this.getMetadata().get(['scopes', scope, 'stream'])) {
this.setupStreamPanel();
}
@@ -73,7 +81,7 @@ define('views/record/detail-bottom', 'views/record/panels-container', function (
view: this.getMetadata().get(['clientDefs', this.scope, 'streamPanelView']) || 'views/stream/panel',
sticked: true,
hidden: !streamAllowed,
order: 2,
index: 2,
});
if (!streamAllowed) {