8885686b3723a1a256cb1ff0677ca8a07927bed4
chmalee
  Thu Apr 4 13:24:20 2024 -0700
Make the hprc table stuff work in an hgc popup, make any javascript that would execute on document ready execute when the pop up is ready, refs #33216

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 233f013..5244124 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -11318,31 +11318,35 @@
                 jsInline("var userLoggedIn = true;");
             // if the CGI variable startTutorial=true is present (in that exact
             // spelling/case), immediately start the tutorial, for example
             // when the user clicks a link from a help page. Note that this
             // means it is a one time link that won't work on refresh because
             // the variable isn't saved onto the URL
             if (sameOk(cgiOptionalString("startTutorial"), "true"))
                 {
                 jsInline("var startTutorialOnLoad = true;");
                 }
             }
         }
 
     hPrintf("<div id='hgTrackUiDialog' style='display: none'></div>\n");
     hPrintf("<div id='hgTracksDialog' style='display: none'></div>\n");
+    if (cfgOptionBooleanDefault("doHgcInPopUp", FALSE))
+        {
+        jsIncludeFile("hgc.js", NULL);
         hPrintf("<div id='hgcDialog' style='display: none'></div>\n");
+        }
 
     cartFlushHubWarnings();
     }
 
 
 if (cartVarExists(cart, "chromInfoPage"))
     {
     cartRemove(cart, "chromInfoPage");
     chromInfoPage();
     }
 else if (differentString(cartUsualString(cart, TRACK_SEARCH,"0"),"0"))
     {
     doSearchTracks(groupList);
     }
 else if (sameWord(configPageCall, "configure") ||