4d633160cf57d928511c8e635a30cd1b4d6b17c2 max Mon Apr 15 20:35:34 2024 -0700 Revert "Revert "changing more info link such that it doesnt change the alignment anymore, refs #33065"" This reverts commit 3d4fe14b34d3a6eb335d4bb228d574300c9324e6. diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 4b0e550..21997e6 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -9459,32 +9459,37 @@ if (strstr(group->label, "Collections")) { safef(idText, sizeof idText, "%s_edit", group->name); hPrintf("<input name=\"hubEditButton\" id='%s'" " type=\"button\" value=\"edit\">\n", idText); jsOnEventByIdF("click", idText, "document.editHubForm.submit();return true;"); } } hPrintf("</td><td style='text-align:center; width:90%%;'>\n<B>%s</B>", group->label); hPrintf("</td><td style='text-align:right;'>\n"); if (isHubTrack(group->name)) { struct trackHub *hub = grabHashedHub(group->name); - if ((hub != NULL) && (hub->descriptionUrl != NULL)) - hPrintf("<a href='%s' style='color:#FFF' target=_blank>More Info</a> ", hub->descriptionUrl); + + // visibility: hidden means that the element takes up space so the center alignment is not disturbed. + char *cssStr = ""; + if ((hub == NULL) || (hub->descriptionUrl == NULL)) + cssStr = "visibility: hidden"; + + hPrintf("<a href='%s' style='color:#FFF; %s' target=_blank>More Info</a> ", hub->descriptionUrl, cssStr); safef(idText, sizeof idText, "%s_disconn", group->name); hPrintf("<input name=\"hubDisconnectButton\" id='%s'" " type=\"button\" value=\"disconnect\">\n", idText); jsOnEventByIdF("click", idText, "document.disconnectHubForm.elements['hubId'].value='%s';" "document.disconnectHubForm.submit();return true;", group->name + strlen(hubTrackPrefix)); } hPrintf("<input type='submit' name='hgt.refresh' value='refresh' " "title='Update image with your changes'>\n"); hPrintf("</td></tr></table></th>\n"); controlGridEndRow(cg);