a0c052bbe5b282a247d480d6d64e6c7325d9bd85 tdreszer Wed Jun 8 12:21:29 2011 -0700 Checking in metadata toggle with up/down arrows. This replaces the '...' link. diff --git src/hg/lib/hui.c src/hg/lib/hui.c index 7933b12..8fde6cf 100644 --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@ -249,32 +249,32 @@ } } dyStringAppend(dyTable,""); //mdbObjsFree(&mdbObj); // spill some memory return dyStringCannibalize(&dyTable); } boolean compositeMetadataToggle(char *db,struct trackDb *tdb,char *title, boolean embeddedInText,boolean showLongLabel, struct hash *trackHash) /* If metadata from metaTbl exists, create a link that will allow toggling it's display */ { const struct mdbObj *safeObj = metadataForTable(db,tdb,NULL); if(safeObj == NULL || safeObj->vars == NULL) return FALSE; -printf("%s%s", - (embeddedInText?" ":"

"),tdb->track,tdb->track, showLongLabel?"true":"false", title); +printf("%s%s", + (embeddedInText?" ":"

"),tdb->track,tdb->track, showLongLabel?"true":"false", (title?title:"")); if (!sameString(tdb->table, tdb->track) && trackHash != NULL) // If trackHash is needed, then can't fill this in with ajax { printf("

",tdb->track, metadataAsHtmlTable(db,tdb,showLongLabel,TRUE,trackHash) ); } else printf("",tdb->track); return TRUE; } void extraUiLinks(char *db,struct trackDb *tdb, struct hash *trackHash) /* Show downlaods, schema and metadata links where appropriate */ { boolean schemaLink = (isCustomTrack(tdb->table) == FALSE) && (hTableOrSplitExists(db, tdb->table)); @@ -4102,31 +4102,31 @@ if (cType != cfgNone) MAKE_CFG_SUBTRACK_LINK(subtrack->track,subtrack->shortLabel); #endif///ndef SUBTRACK_CFG_POPUP else printf("%s",subtrack->shortLabel); puts (""); } #ifdef SUBTRACK_CFG_POPUP dyStringFree(&dyLabel); #endif///def SUBTRACK_CFG_POPUP // The long label column (note that it may have a "..." that allows getting at all the metadata) printf (" %s", subtrack->longLabel); if (trackDbSetting(parentTdb, "wgEncode") && trackDbSetting(subtrack, "accession")) printf (" [GEO:%s]", trackDbSetting(subtrack, "accession")); - compositeMetadataToggle(db,subtrack,"...",TRUE,FALSE, trackHash); + compositeMetadataToggle(db,subtrack,NULL,TRUE,FALSE, trackHash); printf(" "); #ifndef SUBTRACK_CFG_POPUP // Embedded cfg dialogs are within the TD that contains the longLabel. This allows a wide item to be embedded in the table if (cType != cfgNone) { dependentCfgsNeedBinding = TRUE; // configurable subtrack needs to be bound to composite settings #define CFG_SUBTRACK_DIV "
\n" #define MAKE_CFG_SUBTRACK_DIV(table,cfgVar,open) printf(CFG_SUBTRACK_DIV,(table),((open)?"":" style='display:none'"),(cfgVar),((open)?"on":"off")) safef(htmlIdentifier,sizeof(htmlIdentifier),"%s.childShowCfg",subtrack->track); boolean open = cartUsualBoolean(cart, htmlIdentifier,FALSE); MAKE_CFG_SUBTRACK_DIV(subtrack->track,htmlIdentifier,open); safef(htmlIdentifier,sizeof(htmlIdentifier),"%s",subtrack->track); cfgByCfgType(cType,db,cart,subtrack,htmlIdentifier,"Subtrack",TRUE); printf("
");