Skip to content

Commit c1bb7c6

Browse files
committed
- Replaced <a><button> nesting with link() builder
- Added display:inline-flex; and align-items:center; to styled-button CSS class for consistent appearance with <button>
1 parent deb711b commit c1bb7c6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

SkylineToolsStore/src/org/labkey/skylinetoolsstore/view/SkylineToolsStoreWebPart.jsp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
.content {margin: 8px 12px 0 0; padding:0; text-align:justify;}
5959
.toolButtons {margin-top: 12px;}
6060
.styled-button{
61+
display:inline-flex;
62+
align-items:center;
6163
box-shadow:rgba(0,0,0,0.0.1) 0 1px 0 0;
6264
background-color:#5B74A8;
6365
border:1px solid #29447E;
@@ -207,12 +209,12 @@
207209
<%
208210
if (docCount == 1 && hasDocs) {
209211
%>
210-
<a href="<%=h(tool.getDocsUrl())%>" target="_blank" rel="noopener noreferrer"><button type="button" class="styled-button">Documentation <span class="visually-hidden"><%=h(tool.getName())%></span></button></a>
212+
<%=link(unsafe("Documentation <span class=\"visually-hidden\">" + h(tool.getName()) + "</span>")).href(tool.getDocsUrl()).clearClasses().addClass("styled-button").target("_blank").rel("noopener noreferrer")%>
211213
<%
212214
} else if (docCount == 1) {
213215
Map.Entry suppPair = (Map.Entry)suppIter.next();
214216
%>
215-
<a href="<%=h(suppPair.getKey())%>"><button type="button" class="styled-button">Documentation <span class="visually-hidden"><%=h(tool.getName())%></span></button></a>
217+
<%=link(unsafe("Documentation <span class=\"visually-hidden\">" + h(tool.getName()) + "</span>")).href(suppPair.getKey().toString()).clearClasses().addClass("styled-button")%>
216218
<% } else if (docCount > 1) { %>
217219
<div class="menuMouseArea">
218220
<button type="button" class="styled-button">Documentation <span class="visually-hidden"><%=h(tool.getName())%></span></button>

0 commit comments

Comments
 (0)