8dfbd1be0115e390a0d092183e972ffa160d3c32 chmalee Mon Dec 11 15:18:16 2023 -0800 Make recommended track sets not lose it's dialog title, refs Max email diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js index 3fd8ef0..f38f7a1 100644 --- src/hg/js/hgTracks.js +++ src/hg/js/hgTracks.js @@ -3392,31 +3392,34 @@ // Make 'Cancel' button close dialog $('input[name="Cancel"]').click(function() { $('#hgTracksDialog').dialog('close'); }); } }; // Show the recommended track sets popup function showRecTrackSetsPopup() { // Update links with current position $('a.recTrackSetLink').each(function() { var $this = $(this); var link = $this.attr("href").replace(/position=.*/, 'position='); $this.attr("href", link + genomePos.original); }); - $('#recTrackSetsPopup').dialog({width:'650'}); + let popUp = document.getElementById("recTrackSetsPopup"); + title = popUp.title; + if (title.length === 0 && popUp.getAttribute("originaltitle") !== "") {title = popUp.getAttribute("originaltitle");} + $('#recTrackSetsPopup').dialog({width:'650', title: title}); } function removeSessionPanel() { $('#recTrackSetsPanel').remove(); setCartVar("hgS_otherUserSessionLabel", "off", null, false); } // A function to show the keyboard help dialog box, bound to ? and called from the menu bar function showHotkeyHelp() { $("#hotkeyHelp").dialog({width:'600'}); } // A function to add an entry for the keyboard help dialog box to the menubar // and add text that indicates the shortcuts to many static menubar items as suggested by good old IBM CUA/SAA function addKeyboardHelpEntries() {