From 45380b8e56460aee5a6d8abed61cbbf66ee43fea Mon Sep 17 00:00:00 2001 From: David Manthey Date: Wed, 29 Nov 2023 13:00:24 -0500 Subject: [PATCH] Fix a comparison between integer enums in configured item lists --- CHANGELOG.md | 1 + girder/girder_large_image/web_client/templates/itemList.pug | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76ff4663d..1e23e9193 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - Guard against bad tifffile magnification values ([#1383](../../pull/1383)) - Frame Selector component: ensure that no color can be assigned twice ([#1387](../../pull/1387)) - Remove white space in frame selector internal fields ([#1389](../../pull/1389)) +- Fix a comparison between integer enums in configured item lists ([#1391](../../pull/1391)) ## 1.26.1 diff --git a/girder/girder_large_image/web_client/templates/itemList.pug b/girder/girder_large_image/web_client/templates/itemList.pug index 2b9336463..7028911d6 100644 --- a/girder/girder_large_image/web_client/templates/itemList.pug +++ b/girder/girder_large_image/web_client/templates/itemList.pug @@ -6,7 +6,7 @@ ul.g-item-list.li-item-list(layout_mode=(itemList.layout || {}).mode || '') for column, colidx in itemList.columns if column.type !== 'image' || hasAnyLargeImage span.li-item-list-header( - class=((column.type === 'record' && column.value !== 'controls') || column.type === 'metadata' ? 'sortable' : '') + ' ' + (sort && sort[0].type === column.type && sort[0].value === column.value ? sort[0].dir : ''), + class=((column.type === 'record' && column.value !== 'controls') || column.type === 'metadata' ? 'sortable' : '') + ' ' + (sort && sort[0].type === column.type && ('' + sort[0].value === '' + column.value) ? sort[0].dir : ''), column_type=column.type, column_value=column.value) if column.title !== undefined - colNames[colidx] = column.title @@ -80,7 +80,7 @@ ul.g-item-list.li-item-list(layout_mode=(itemList.layout || {}).mode || '') if column.enum select.input-sm.form-control.g-widget-metadata-value-input.g-widget-metadata-lientry(title=column.description) for enumval in column.enum - option(value=enumval, selected=enumval === value ? 'selected' : null) + option(value=enumval, selected=('' + enumval) === ('' + value) ? 'selected' : null) = enumval else input.input-sm.form-control.g-widget-metadata-value-input.g-widget-metadata-column(placeholder=column.description || "Value", value=value, title=column.description)