From e4f44823def35ae16d82378716c0d6e62c9cae21 Mon Sep 17 00:00:00 2001 From: David Manthey Date: Wed, 10 Aug 2022 17:10:11 -0400 Subject: [PATCH] Always have item lists have links to the items. Strictly, this is only true if there are any columns besides the controls. --- .../girder_large_image/web_client/stylesheets/itemList.styl | 2 +- girder/girder_large_image/web_client/templates/itemList.pug | 4 ++-- girder/test_girder/web_client_specs/imageViewerSpec.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/girder/girder_large_image/web_client/stylesheets/itemList.styl b/girder/girder_large_image/web_client/stylesheets/itemList.styl index 3e79d284b..90e8d816e 100644 --- a/girder/girder_large_image/web_client/stylesheets/itemList.styl +++ b/girder/girder_large_image/web_client/stylesheets/itemList.styl @@ -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 diff --git a/girder/girder_large_image/web_client/templates/itemList.pug b/girder/girder_large_image/web_client/templates/itemList.pug index 705a5f306..15f4c2a44 100644 --- a/girder/girder_large_image/web_client/templates/itemList.pug +++ b/girder/girder_large_image/web_client/templates/itemList.pug @@ -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' diff --git a/girder/test_girder/web_client_specs/imageViewerSpec.js b/girder/test_girder/web_client_specs/imageViewerSpec.js index 4b282e705..4b0e31dde 100644 --- a/girder/test_girder/web_client_specs/imageViewerSpec.js +++ b/girder/test_girder/web_client_specs/imageViewerSpec.js @@ -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(); });