eb8483343ae0c285f9b74f7ebbc96d2abcb9816c Merge parents b2970a8 573d168 chmalee Thu Mar 23 11:46:25 2023 -0700 Merge branch 'master' into chmalee_hgTracksTutorial diff --cc src/hg/js/hgTracks.js index 6fdac7f,405c872..56d4e89 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@@ -5460,35 -5460,29 +5460,34 @@@ } // 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); } + // show a tutorial page if this is a new user + if (tour !== undefined) { + tour.start(); + } + });