Skip to content

Commit f0c6b86

Browse files
brendanx67claude
andcommitted
Converted Download button to anchor and fixed styled-button link styling
* Converted Download <button> to <a> using link() builder for consistency * Added a.styled-button CSS for text-decoration and visited color * Moved space into visually-hidden span as &nbsp; to prevent collapsing Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c1bb7c6 commit f0c6b86

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474
cursor:pointer;
7575
}
7676
.styled-button:hover{background-color:#1e90ff; color:#f5f5dc;}
77+
a.styled-button{text-decoration:none; color:#fff;}
78+
a.styled-button:visited{color:#fff;}
7779
.toolOwners {width: 80%; min-width: 300px;}
7880
.ui-menu {width:240px;}
7981
.dropMenu {position: absolute;}
@@ -204,20 +206,19 @@
204206

205207
<div class="toolButtons">
206208

207-
<button type="button" id="download-tool-btn-<%=tool.getRowId()%>" class="styled-button">Download <span class="visually-hidden"><%=h(tool.getName())%></span></button>
208-
<% addHandler("download-tool-btn-" + tool.getRowId(), "click", "window.location.href = " + q(urlFor(SkylineToolsStoreController.DownloadToolAction.class).addParameter("id", tool.getRowId()))); %>
209+
<%=link(unsafe("Download<span class=\"visually-hidden\">&nbsp;" + h(tool.getName()) + "</span>")).href(urlFor(SkylineToolsStoreController.DownloadToolAction.class).addParameter("id", tool.getRowId()).toString()).clearClasses().addClass("styled-button")%>
209210
<%
210211
if (docCount == 1 && hasDocs) {
211212
%>
212-
<%=link(unsafe("Documentation <span class=\"visually-hidden\">" + h(tool.getName()) + "</span>")).href(tool.getDocsUrl()).clearClasses().addClass("styled-button").target("_blank").rel("noopener noreferrer")%>
213+
<%=link(unsafe("Documentation<span class=\"visually-hidden\">&nbsp;" + h(tool.getName()) + "</span>")).href(tool.getDocsUrl()).clearClasses().addClass("styled-button").target("_blank").rel("noopener noreferrer")%>
213214
<%
214215
} else if (docCount == 1) {
215216
Map.Entry suppPair = (Map.Entry)suppIter.next();
216217
%>
217-
<%=link(unsafe("Documentation <span class=\"visually-hidden\">" + h(tool.getName()) + "</span>")).href(suppPair.getKey().toString()).clearClasses().addClass("styled-button")%>
218+
<%=link(unsafe("Documentation<span class=\"visually-hidden\">&nbsp;" + h(tool.getName()) + "</span>")).href(suppPair.getKey().toString()).clearClasses().addClass("styled-button")%>
218219
<% } else if (docCount > 1) { %>
219220
<div class="menuMouseArea">
220-
<button type="button" class="styled-button">Documentation <span class="visually-hidden"><%=h(tool.getName())%></span></button>
221+
<button type="button" class="styled-button">Documentation<span class="visually-hidden"><%=h(tool.getName())%></span></button>
221222
<ul class="dropMenu">
222223
<% if (hasDocs) { %>
223224
<li><a href="<%=h(tool.getDocsUrl())%>" target="_blank" rel="noopener noreferrer"><img class="menuIconImg" src="<%= h(imgDir) %>link.png" alt="Documentation">Online Documentation</a></li>

0 commit comments

Comments
 (0)