Skip to content

Commit

Permalink
Fix a comparison between integer enums in configured item lists
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Nov 29, 2023
1 parent 9a43c4e commit 45380b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions girder/girder_large_image/web_client/templates/itemList.pug
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 45380b8

Please sign in to comment.