42379069550347d7135531a382a9a30958d106a2 galt Mon Jul 16 17:25:15 2012 -0700 fixed html error found by htmlCheck; added some newlines to make show source more legible diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 4821ba5..d068f20 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -79,42 +79,42 @@ /* List of associated genomes. */ struct trackHubGenome *genomes = thub->genomeList; for(; genomes; genomes = genomes->next) hashStore(hash, genomes->name); } } static void hgHubConnectUnlisted(struct hubConnectStatus *hubList, struct hash *publicHash) /* Put up the list of unlisted hubs and other controls for the page. */ /* uses publicHash to distingusih public hubs from unlisted ones */ /* NOTE: Destroys hubList */ { // put out the top of our page -printf("<div id=\"unlistedHubs\" class=\"hubList\"> " - "<table id=\"unlistedHubsTable\"> " - "<thead><tr> " - "<th colspan=\"6\" id=\"addHubBar\"><label for=\"hubUrl\">URL:</label> " +printf("<div id=\"unlistedHubs\" class=\"hubList\"> \n" + "<table id=\"unlistedHubsTable\"> \n" + "<thead><tr> \n" + "<th colspan=\"6\" id=\"addHubBar\"><label for=\"hubUrl\">URL:</label> \n" "<input name=\"hubText\" id=\"hubUrl\" class=\"hubField\"" - "type=\"text\" size=\"65\"> " + "type=\"text\" size=\"65\"> \n" "<input name=\"hubAddButton\"" "onClick=\"if(validateUrl($('#hubUrl').val())) { document.addHubForm.elements['hubUrl'].value=hubText.value;" "document.addHubForm.submit();return true;} else { return false;}\" " - "class=\"hubField\" type=\"button\" value=\"Add Hub\">" - "</th> " - "</tr> "); + "class=\"hubField\" type=\"button\" value=\"Add Hub\">\n" + "</th> \n" + "</tr> \n"); // count up the number of unlisted hubs we currently have int unlistedHubCount = 0; struct hubConnectStatus *unlistedHubList = NULL; struct hubConnectStatus *hub, *nextHub; struct hash *assHash = newHash(5); for(hub = hubList; hub; hub = nextHub) { nextHub = hub->next; // if url is not in publicHash, it's unlisted */ if (!((publicHash != NULL) && hashLookup(publicHash, hub->hubUrl))) { addGenomesToHash(hub, assHash); unlistedHubCount++; @@ -129,102 +129,101 @@ struct hashEl *hel; int numAssemblies = 0; while ((hel = hashNext(&cookie)) != NULL) { dyStringPrintf(dy,"%s,", hel->name); numAssemblies++; } char *dbList = NULL; if (numAssemblies) dbList = dyStringCannibalize(&dy); if (unlistedHubCount == 0) { // nothing to see here - printf( - "<tr><td>No Unlisted Track Hubs</td></tr>" - "</td>"); - printf("</table></thead></div>"); + printf("<tr><td>No Unlisted Track Hubs</td></tr>"); + printf("</thead></table></div>"); return; } // time to output the big table. First the header printf( "<tr> " "<th>Display</th> " "<th>Hub Name</th> " "<th>Description</th> " "<th>Assemblies</th> " "<th>URL</th> " "<th>Disconnect</th> " - "</tr></thead>\n"); + "</tr>\n" + "</thead>\n"); // start first row printf("<tbody><tr>"); int count = 0; for(hub = unlistedHubList; hub; hub = hub->next) { if (count) webPrintLinkTableNewRow(); // ends last row and starts a new one count++; // if there's an error message, we don't let people select it if (isEmpty(hub->errorMessage)) { ourCellStart(); char hubName[32]; safef(hubName, sizeof(hubName), "%s%u", hgHubConnectHubVarPrefix, hub->id); cartMakeCheckBox(cart, hubName, FALSE); ourCellEnd(); } else { // give people a chance to clear the error ourCellStart(); printf( "<input name=\"hubClearButton\"" "onClick=\"document.resetHubForm.elements['hubUrl'].value='%s';" "document.resetHubForm.submit();return true;\" " - "class=\"hubField\" type=\"button\" value=\"check hub\">" + "class=\"hubField\" type=\"button\" value=\"check hub\">\n" , hub->hubUrl); ourCellEnd(); } if (hub->trackHub != NULL) ourPrintCell(hub->trackHub->shortLabel); else ourPrintCell(""); if (!isEmpty(hub->errorMessage)) printf("<TD><span class=\"hubError\">ERROR: %s </span>" - "<a href=\"../goldenPath/help/hgTrackHubHelp.html#Debug\">Debug</a></TD>", + "<a href=\"../goldenPath/help/hgTrackHubHelp.html#Debug\">Debug</a></TD>\n", hub->errorMessage); else if (hub->trackHub != NULL) ourPrintCell(hub->trackHub->longLabel); else ourPrintCell(""); ourPrintCell(removeLastComma(dbList)); ourPrintCell(hub->hubUrl); ourCellStart(); printf( "<input name=\"hubDisconnectButton\"" "onClick=\"document.disconnectHubForm.elements['hubId'].value='%d';" "document.disconnectHubForm.submit();return true;\" " - "class=\"hubField\" type=\"button\" value=\"X\">" + "class=\"hubField\" type=\"button\" value=\"X\">\n" , hub->id); ourCellEnd(); } printf("</TR></tbody></TABLE>\n"); printf("</div>"); } static struct hash *outputPublicTable(struct sqlConnection *conn, char *publicTable) /* Put up the list of public hubs and other controls for the page. */ { struct hash *publicHash = NULL; char query[512]; safef(query, sizeof(query), "select hubUrl,shortLabel,longLabel,dbList from %s", publicTable);