From f09fe03f60ea5b6bf94a6e888263883318f14641 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 7 Feb 2023 21:51:21 +0200 Subject: [PATCH 1/3] prevent checking record not in collection --- client/src/views/record/list.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js index c265b80368..a6b9224acc 100644 --- a/client/src/views/record/list.js +++ b/client/src/views/record/list.js @@ -2477,6 +2477,10 @@ function (Dep, MassActionHelper, ExportHelper, RecordModal) { * @param {boolean} [isSilent] Do not trigger the `check` event. */ checkRecord: function (id, $target, isSilent) { + if (!this.collection.get(id)) { + return; + } + $target = $target || this.$el.find('.record-checkbox[data-id="' + id + '"]'); if ($target.length) { From 89d775a8a81949c661c89a7bf5593ea7dcc8172c Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 8 Feb 2023 10:57:05 +0200 Subject: [PATCH 2/3] fix list image preview size --- client/src/views/fields/file.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/client/src/views/fields/file.js b/client/src/views/fields/file.js index d06866d496..055f0ecb1e 100644 --- a/client/src/views/fields/file.js +++ b/client/src/views/fields/file.js @@ -333,18 +333,14 @@ define('views/fields/file', ['views/fields/link', 'helpers/file-upload'], functi let previewSize = this.previewSize; if (this.isListMode()) { - previewSize = 'small'; - - if (this.params.listPreviewSize) { - previewSize = this.params.listPreviewSize; - } + previewSize = this.params.listPreviewSize || 'small'; } let src = this.getBasePath() + '?entryPoint=image&size=' + previewSize + '&id=' + id; - let maxHeight = (this.imageSizes[this.previewSize] || {})[1]; + let maxHeight = (this.imageSizes[previewSize] || {})[1]; - if (this.isListMode()) { + if (this.isListMode() && !this.params.listPreviewSize) { maxHeight = this.ROW_HEIGHT + 'px'; } @@ -352,7 +348,7 @@ define('views/fields/file', ['views/fields/link', 'helpers/file-upload'], functi .attr('src', src) .addClass('image-preview') .css({ - maxWidth: (this.imageSizes[this.previewSize] || {})[0], + maxWidth: (this.imageSizes[previewSize] || {})[0], maxHeight: maxHeight, }); From 93c1f4ef8ae4446a0dfdf937fae3c778e1dd2c03 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 14 Feb 2023 10:42:05 +0200 Subject: [PATCH 3/3] fix foreign multi-enum export --- application/Espo/Tools/Export/Processors/Xlsx.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/Espo/Tools/Export/Processors/Xlsx.php b/application/Espo/Tools/Export/Processors/Xlsx.php index 520abed50b..d7b63adc36 100644 --- a/application/Espo/Tools/Export/Processors/Xlsx.php +++ b/application/Espo/Tools/Export/Processors/Xlsx.php @@ -608,7 +608,7 @@ class Xlsx implements Processor $array = []; } - foreach ($array as $item) { + foreach ($array as $i => $item) { if ($linkName) { $itemValue = $this->language ->translateOption($item, $foreignField, $foreignScope);