e2be82208cc33ab43a11087601a846931e2346a5 chmalee Wed Mar 22 15:07:11 2023 -0700 Change downloads current track data button to a link in the downloads menu, refs #30865 diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 970f408..405c872 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -5460,30 +5460,29 @@ } // jquery.history.js Back-button support if (imageV2.enabled && imageV2.backSupport) { imageV2.setupHistory(); } // ensure clicks into hgTrackUi save the cart state $("td a").each( function (tda) { if (this.href && this.href.indexOf("hgTrackUi") !== -1) { this.onclick = posting.saveSettings; } }); - // add a button to download the current track data (under hg.conf control) + // add a 'link' to download the current track data (under hg.conf control) if (typeof showDownloadButton !== 'undefined' && showDownloadButton) { - newButton = document.createElement("input"); - newButton.setAttribute("id", "hgTracksDownload"); - newButton.setAttribute("type", "button"); - newButton.setAttribute("name", "downloadTracks"); - newButton.setAttribute("value", "download current tracks"); - newButton.setAttribute("title", "download track data in window"); - // add a space to match the other buttons - $("#hgt\\.setWidth")[0].parentNode.appendChild(document.createTextNode(" ")); - $("#hgt\\.setWidth")[0].parentNode.appendChild(newButton); + newListEl = document.createElement("li"); + newLink = document.createElement("a"); + newLink.setAttribute("id", "hgTracksDownload"); + newLink.setAttribute("name", "downloadTracks"); + newLink.textContent = "Download Current Track Data"; + newLink.href = "#"; + newListEl.appendChild(newLink); + $("#downloads > ul")[0].appendChild(newListEl); $("#hgTracksDownload").click(downloadCurrentTrackData.showDownloadUi); } });