00a7706afb08c6e2523ea9645bd0f6bb25308593
jnavarr5
  Thu Nov 14 16:41:59 2024 -0800
Adding more text changes that Lou suggested. Removing the basic tutorial link in the Help menu. Editing comments in the code, refs #34208

diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 23ec43b..7dcd54c 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -5830,52 +5830,45 @@
             if (tmp !== null) {tutMsgCount = parseInt(tmp);}
             // if the user is not logged in and they have not already gone through the
             // tutorial
             if (!isUserLoggedIn && !hideTutorial && tutMsgCount < 5) {
                 let msg = "New to the Genome Browser? See our short (2-3 minute) guided tutorial. " +
                     "All tutorials can be found in the top blue bar menu under <b>Help</b> > <b>Interactive Tutorial</b>.<br>" +
                     "<button id='showTutorialLink' href=\"#showTutorial\">Start tutorial</button>";
                 notifBoxSetup("hgTracks", "hideTutorial", msg, true);
                 notifBoxShow("hgTracks", "hideTutorial");
                 localStorage.setItem("hgTracks_tutMsgCount", ++tutMsgCount);
                 $("#showTutorialLink").on("click", function() {
                     $("#hgTracks_hideTutorialnotifyHideForever").trigger("click");
                     basicTour.start();
                 });
             }
-            // allow user to bring the tutorial up under the help menu whether they've seen
-            // it or not
-            let tutorialLinkMenuItem = document.createElement("li");
-            tutorialLinkMenuItem.id = "hgTracksHelpTutorialMenuItem";
-            tutorialLinkMenuItem.innerHTML = "<a id='hgTracksHelpTutorialLink' href='#showTutorial'>" +
-                "Interactive Tutorial</a>";
-            $("#help > ul")[0].appendChild(tutorialLinkMenuItem);
-            $("#hgTracksHelpTutorialLink").on("click", function () {
-                basicTour.start();
-            });
-            // Create a new button in the Help menu to show all available javascript tutorials
+            // allow the user to bring the tutorials popup via a new help menu button
             let tutorialLinks = document.createElement("li");
             tutorialLinks.id = "hgTracksHelpTutorialLinks";
             tutorialLinks.innerHTML = "<a id='hgTracksHelpTutorialLinks' href='#showTutuorialPopup'>" +
-                "Show All Interactive Tutorials</a>";
+                "Interactive Tutorials</a>";
             $("#help > ul")[0].appendChild(tutorialLinks);
             $("#hgTracksHelpTutorialLinks").on("click", function () {
-                let tutorialPopupExists = document.getElementById ("tutorialContainer"); // Check to see if the <div> has been generated already
+                // Check to see if the tutorial popup has been generated already
+                let tutorialPopupExists = document.getElementById ("tutorialContainer");
                 if (!tutorialPopupExists) {
-                    createTutorialPopup(); // Create the tutorial popup if it doesn't exist
+                    // Create the tutorial popup if it doesn't exist
+                    createTutorialPopup();
                 } else {
-                    $("#tutorialContainer").dialog("open"); //otherwise use jquery-ui to open the popup
+                    //otherwise use jquery-ui to open the popup
+                    $("#tutorialContainer").dialog("open");
                 }
             });
         }
         
         // Any highlighted region must be shown and warnBox must play nice with it.
         imageV2.drawHighlights();
         // When warnBox is dismissed, any image highlight needs to be redrawn.
         $('#warnOK').on("click", function (e) { imageV2.drawHighlights();});
         // Also extend the function that shows the warn box so that it too redraws the highlight.
         showWarnBox = (function (oldShowWarnBox) {
             function newShowWarnBox() {
                 oldShowWarnBox.apply();
                 imageV2.drawHighlights();
             }
             return newShowWarnBox;