eb529048797dc23f5dea4eeaa336578fabb67b98
jnavarr5
  Wed Nov 13 13:32:40 2024 -0800
Adding a link to the Help menu to open a popup with all available javascript tutorials, refs #34208

diff --git src/hg/js/hgTracks.js src/hg/js/hgTracks.js
index 8f4d828..fe69b9a 100644
--- src/hg/js/hgTracks.js
+++ src/hg/js/hgTracks.js
@@ -5841,30 +5841,39 @@
                 $("#showTutorialLink").on("click", function() {
                     $("#hgTracks_hideTutorialnotifyHideForever").trigger("click");
                     tour.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 () {
                 tour.start();
             });
+            // Create a new button in the Help menu to show all available javascript tutorials
+            let tutorialLinks = document.createElement("li");
+            tutorialLinks.id = "hgTracksHelpTutorialLinks";
+            tutorialLinks.innerHTML = "<a id='hgTracksHelpTutorialLinks' href='#showTutuorialPopup'>" +
+                "Show All Interactive Tutorials</a>";
+            $("#help > ul")[0].appendChild(tutorialLinks);
+            $("#hgTracksHelpTutorialLinks").on("click", function () {
+                openTutorialPopup();
+            });
         }
         
         // 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;
         })(showWarnBox);
         // redraw highlights if the notification box is closed