Skip to content

Commit

Permalink
Always have item lists have links to the items.
Browse files Browse the repository at this point in the history
Strictly, this is only true if there are any columns besides the
controls.
  • Loading branch information
manthey committed Aug 11, 2022
1 parent 03f6c40 commit e4f4482
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ul.g-item-list
content "\002b63"
&.up:after
content "\002b61"
>span.li-item-list-cell
>.li-item-list-cell
display table-cell
padding-top 4px
padding-bottom 3px
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 @@ -25,10 +25,10 @@ ul.g-item-list.li-item-list
span.li-item-list-cell
input.g-list-checkbox(type="checkbox", g-item-cid=item.cid)
for column in itemList.columns
span.li-item-list-cell(class=(('' + column.type + column.value).match(/^[a-zA-Z][a-zA-Z0-9-_]*$/) ? `li-column-${column.type}-${column.value}` : '') + ' ' + (('' + column.type).match(/^[a-zA-Z][a-zA-Z0-9-_]*$/) ? `li-column-${column.type}` : ''))
#{column.type !== 'record' || column.value !== 'controls' ? 'a' : 'span'}.li-item-list-cell(class=(('' + column.type + column.value).match(/^[a-zA-Z][a-zA-Z0-9-_]*$/) ? `li-column-${column.type}-${column.value}` : '') + (('' + column.type).match(/^[a-zA-Z][a-zA-Z0-9-_]*$/) ? ` li-column-${column.type}` : ''), g-item-cid=item.cid, href=`#item/${item.id}`)
if column.type === 'record'
if column.value === 'name'
a.g-item-list-link(g-item-cid=item.cid, href=`#item/${item.id}`)
span.g-item-list-link
i.icon-doc-text-inv
= item.name()
else if column.value === 'controls'
Expand Down
4 changes: 2 additions & 2 deletions girder/test_girder/web_client_specs/imageViewerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,10 +232,10 @@ $(function () {
});
it('navigate back to image', function () {
waitsFor(function () {
return $('a.g-item-list-link').filter(function () { return $(this).text() !== '.large_image_config.yaml'}).length > 0;
return $('span.g-item-list-link').filter(function () { return $(this).text() !== '.large_image_config.yaml'; }).length > 0;
}, 'link to appear');
runs(function () {
$('a.g-item-list-link').filter(function () { return $(this).text() !== '.large_image_config.yaml'}).click();
$('span.g-item-list-link').filter(function () { return $(this).text() !== '.large_image_config.yaml'; }).click();
});
girderTest.waitForLoad();
});
Expand Down

0 comments on commit e4f4482

Please sign in to comment.