2ce19ed02e1d1657b6750b506d01d6fe3cb56e8c chmalee Tue May 26 09:12:23 2026 -0700 Make myVariants Add Annotation button present below the image whether you are logged in or not. If not logged in, direct user to login, refs #33808 diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 97b72d6c83e..19d6115ad8c 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -1406,31 +1406,38 @@ }, init: function () { // show a jquery-ui dialog when a user clicks on the 'Add Annotation' button let dialog = document.getElementById('myVariantsDialog'); if (!dialog) { dialog = document.createElement("div"); dialog.id = "myVariantsDialog"; dialog.style = "display: none"; dialogButtons = {}; // Call the function to build the form, but only if logged in already if (!userIsLoggedIn) { let msg = document.createElement("div"); msg.id = "logInMessage"; - msg.innerHTML = "Please log in to use this feature."; + let href = (typeof myVariantsLoginUrl !== "undefined" && myVariantsLoginUrl) + ? myVariantsLoginUrl : "./hgSession"; + let link = document.createElement("a"); + link.href = href; + link.textContent = "log in"; + msg.appendChild(document.createTextNode("Please ")); + msg.appendChild(link); + msg.appendChild(document.createTextNode(" to use this feature.")); dialog.appendChild(msg); } else { let form = this.createBedForm(dialog); document.body.append(dialog); dialogButtons.Submit = function() { // extract the form elements and check myVariants.createItem(form); }; } dialogButtons.Cancel = function(){ $(this).dialog("close"); }; $(dialog).dialog({ title: "My Annotations",