Skip to content

Commit 3f5529f

Browse files
committed
Merge remote-tracking branch 'origin/2.2' into 2.x
2 parents 1781127 + c979f24 commit 3f5529f

3 files changed

Lines changed: 29 additions & 6 deletions

File tree

public/js/pimcore/element/helpers/gridCellEditor.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,20 @@ Ext.define('pimcore.element.helpers.gridCellEditor', {
8888
bodyStyle: "padding: 10px;"
8989
});
9090
let width = 700;
91-
if (tagType === 'manyToManyObjectRelation' && fieldInfo.layout.width && fieldInfo.layout.width !== '100%') {
91+
92+
if (tagType === 'manyToOneRelation') {
93+
width = sumWidths(
94+
formPanel.config.items[0].items.items[0].width,
95+
formPanel.config.items[0].labelWidth + 140
96+
);
97+
} else if (
98+
tagType.endsWith('Relation') &&
99+
fieldInfo.layout?.width &&
100+
fieldInfo.layout?.width !== '100%'
101+
) {
92102
width = sumWidths(fieldInfo.layout.width, 25);
93103
}
104+
94105
this.editWin = new Ext.Window({
95106
modal: false,
96107
title: t("edit") + " " + fieldInfo.layout.title,

public/js/pimcore/element/helpers/gridColumnConfig.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,6 @@ pimcore.element.helpers.gridColumnConfig = {
433433
containerType: "filterByRelationWindow"
434434
});
435435

436-
editor.fieldConfig.width = 300;
437-
438436
const activeFilter = this.grid.getStore().getFilters().items;
439437

440438
for (let filter of activeFilter) {
@@ -495,9 +493,17 @@ pimcore.element.helpers.gridColumnConfig = {
495493

496494
const title = t("filter_by_relation_field") + " " + fieldInfo.text;
497495
let width = 700;
498-
if (tagType === 'manyToManyObjectRelation' && fieldInfo.layout.layout.width && fieldInfo.layout.layout.width !== '100%') {
499-
width = sumWidths(fieldInfo.layout.layout.width, 25);
500-
}
496+
if (tagType === 'manyToOneRelation') {
497+
width = sumWidths(
498+
formPanel.config.items[0].items.items[0].width,
499+
formPanel.config.items[0].labelWidth + 140
500+
);
501+
} else if (
502+
tagType === 'manyToManyObjectRelation' &&
503+
fieldInfo.layout?.layout.width &&
504+
fieldInfo.layout?.layout.width !== '100%') {
505+
width = sumWidths(fieldInfo.layout.layout.width, 25);}
506+
501507
this.filterByRelationWindow = new Ext.Window({
502508
autoScroll: true,
503509
modal: false,

public/js/pimcore/object/edit.js

100644100755
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ pimcore.object.edit = Class.create({
8686

8787
//only include changed values in save response.
8888
if(currentField.isDirty()) {
89+
if (currentField.context?.subContainerType === 'block') {
90+
currentField.getValue().map((item, index) => {
91+
if('oIndex' in item)
92+
item.oIndex = index;
93+
});
94+
}
8995
values[currentField.getName()] = currentField.getValue();
9096
}
9197
}

0 commit comments

Comments
 (0)