f77196f3a66db3bb1bce1913a2e7d6223db94c0b chmalee Mon May 22 15:58:42 2023 -0700 Make tutorial login dependent, add a link to view the tutorial under Help diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index b5e6b34..36ee206 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -66,30 +66,31 @@ #include "basicBed.h" #include "customFactory.h" #include "dupTrack.h" #include "genbank.h" #include "bigWarn.h" #include "wigCommon.h" #include "knetUdc.h" #include "hex.h" #include <openssl/sha.h> #include "customComposite.h" #include "chromAlias.h" #include "jsonWrite.h" #include "cds.h" #include "cacheTwoBit.h" #include "cartJson.h" +#include "wikiLink.h" //#include "bed3Sources.h" /* Other than submit and Submit all these vars should start with hgt. * to avoid weeding things out of other program's namespaces. * Because the browser is a central program, most of its cart * variables are not hgt. qualified. It's a good idea if other * program's unique variables be qualified with a prefix though. */ char *excludeVars[] = { "submit", "Submit", "dirty", "hgt.reset", "hgt.in1", "hgt.in2", "hgt.in3", "hgt.inBase", "hgt.out1", "hgt.out2", "hgt.out3", "hgt.out4", "hgt.left1", "hgt.left2", "hgt.left3", "hgt.right1", "hgt.right2", "hgt.right3", "hgt.dinkLL", "hgt.dinkLR", "hgt.dinkRL", "hgt.dinkRR", "hgt.tui", "hgt.hideAll", "hgt.visAllFromCt", @@ -11120,30 +11121,35 @@ webIncludeResourceFile("jquery-ui.css"); if (enableMouseOver) webIncludeResourceFile("mouseOver.css"); if (!searching) // NOT doing search { webIncludeResourceFile("jquery.contextmenu.css"); jsIncludeFile("jquery.contextmenu.js", NULL); webIncludeResourceFile("ui.dropdownchecklist.css"); jsIncludeFile("ui.dropdownchecklist.js", NULL); jsIncludeFile("ddcl.js", NULL); if (cfgOptionBooleanDefault("showTutorial", FALSE)) puts("<script src=\"https://cdn.jsdelivr.net/npm/shepherd.js@11.0.1/dist/js/shepherd.min.js\"></script>"); puts("<link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/shepherd.js@11.0.1/dist/css/shepherd.css\"/>"); jsIncludeFile("tutorial.js",NULL); + // if the user is logged in, we won't show the notification + // that a tutorial is available, just leave the link in the + // blue bar under "Help" + if (wikiLinkUserName()) + jsInline("var userLoggedIn = true;"); } hPrintf("<div id='hgTrackUiDialog' style='display: none'></div>\n"); hPrintf("<div id='hgTracksDialog' style='display: none'></div>\n"); cartFlushHubWarnings(); } if (cartVarExists(cart, "chromInfoPage")) { cartRemove(cart, "chromInfoPage"); chromInfoPage(); } else if (differentString(cartUsualString(cart, TRACK_SEARCH,"0"),"0"))