00a364772e6004ac5d9d221c0594121063791471
chmalee
  Mon Oct 7 09:50:38 2024 -0700
After meeting with QA, start small redesign to emphasize getting a track uploaded. Change the file selector to be in a modal, make the newest files sort to top and be highlighted, add a batch change file type and db, auto-detect the db from the cart

diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c
index ffc80df..e9fdd0d 100644
--- src/hg/hgHubConnect/hgHubConnect.c
+++ src/hg/hgHubConnect/hgHubConnect.c
@@ -1499,53 +1499,52 @@
 const struct hubConnectStatus *b = *((struct hubConnectStatus **)vb);
 struct trackHub *ta = a->trackHub;
 struct trackHub *tb = b->trackHub;
 
 if ((ta == NULL) || (tb == NULL))
     return 0;
 
 return strcasecmp(tb->shortLabel, ta->shortLabel);
 }
 
 void printIncludes() 
 /* print the CSS and javascript include lines */
 {
 printf(
 "<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/themes/default/style.min.css\" />\n"
-"<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.1/jquery.min.js\"></script>\n"
 "<script src=\"https://cdnjs.cloudflare.com/ajax/libs/jstree/3.3.7/jstree.min.js\"></script>\n"
 "<style>.jstree-default .jstree-anchor { height: initial; } </style>\n"
 );
 jsIncludeFile("utils.js", NULL);
 jsIncludeFile("jquery-ui.js", NULL);
 webIncludeResourceFile("jquery-ui.css");
 jsIncludeFile("ajax.js", NULL);
 jsIncludeFile("hgHubConnect.js", NULL);
 webIncludeResourceFile("hgHubConnect.css");
 jsIncludeFile("jquery.cookie.js", NULL);
 jsIncludeFile("spectrum.min.js", NULL); // there is no color picker used anywhere on this page. why include this?
 }
 
 void blankWarn()
 /* Dummy warn handler used in the iframe for returning hubCheck output */
 {
 }
 
-void hgHubConnectOfferUpload()
+void hgHubConnectOfferUpload(char *db)
 /* Make the tab that allows users to upload data files and create a hub on the fly */
 {
-doTrackHubWizard();
+doTrackHubWizard(db);
 }
 
 void doMiddle(struct cart *theCart)
 /* Write header and body of html page. */
 {
 cart = theCart;
 // hgHubConnect's own timing is tied to a special value of measureTiming, since now
 // our users use measureTiming a lot more, we need to keep a special mode for us
 measureTiming = sameString(cartUsualString(cart, "measureTiming", ""), "full");
 
 if(cgiIsOnWeb())
     checkForGeoMirrorRedirect(cart);
 
 if (cartVarExists(cart, hgHubDoClear))
     {
@@ -1694,31 +1693,31 @@
 // The public hubs table is getting big and takes a while to download.
 // Jquery UI's tabs() command will layout the page, but because of
 // jsInlining, it will only be called at the end of the page. This can lead to the page "jumping".
 // To make the inline code run now, let's flush JS inlines.
 // I'm not sure that this makes a visible difference, but it doesn't do any harm either
 jsInlineFinish();
 jsInlineReset();
 
 struct hash *publicHash = hgHubConnectPublic();
 
 hgHubConnectUnlisted(hubList, publicHash);
 
 if (cfgOptionBooleanDefault("hgHubConnect.validateHub", TRUE))
     hgHubConnectDeveloperMode();
 if (cfgOptionBooleanDefault("storeUserFiles", TRUE))
-    hgHubConnectOfferUpload();
+    hgHubConnectOfferUpload(database);
 
 printf("</div>"); // #tabs
 
 
 cartWebEnd();
 }
 
 void doAsync(struct cart *theCart)
 /* Execute the async request */
 {
 cart = theCart;
 struct cartJson *cj = cartJsonNew(cart);
 cartJsonRegisterHandler(cj, hgHubDeleteFile, doRemoveFile);
 cartJsonRegisterHandler(cj, hgHubCreateHub, doCreateHub);
 cartJsonRegisterHandler(cj, hgHubMoveFile, doMoveFile);