a3fe2462440781ba92b9fb1ef95bec0359028325
angie
Mon Jul 20 09:28:59 2015 -0700
Adding Data Integrator to list of destinations from the Manage Custom Tracks
page. Since there are now 4 destinations, instead of having one button for
each, use a menu to select the destination and a single 'go' button.
Align the 'add custom tracks' button with the new menu.
refs #15517
diff --git src/hg/hgCustom/hgCustom.c src/hg/hgCustom/hgCustom.c
index f56033c..f9afdcd 100644
--- src/hg/hgCustom/hgCustom.c
+++ src/hg/hgCustom/hgCustom.c
@@ -630,30 +630,63 @@
/* Get list of assemblies with custom tracks */
struct hashEl *hels = cartFindPrefix(cart, CT_FILE_VAR_PREFIX);
struct hashEl *hel = NULL;
for (hel = hels; hel != NULL; hel = hel->next)
{
/* TODO: chop actual prefix */
db = chopPrefixAt(cloneString(hel->name), '_');
/* TODO: check if file exists, if not remove ctfile_ var */
dbDb = hDbDb(db);
if (dbDb)
slAddTail(&dbList, dbDb);
}
return dbList;
}
+static struct slPair *makeOtherCgiValsAndLabels()
+/* Return {value, label} pairs with other CGIs the user might wish to jump to. */
+{
+struct slPair *valsAndLabels = slPairNew(hgTracksName(), "Genome Browser");
+slAddHead(&valsAndLabels, slPairNew(hgTablesName(), "Table Browser"));
+slAddHead(&valsAndLabels, slPairNew(hgVaiName(), "Variant Annotation Integrator"));
+slAddHead(&valsAndLabels, slPairNew(hgIntegratorName(), "Data Integrator"));
+slReverse(&valsAndLabels);
+return valsAndLabels;
+}
+
+static void makeOtherCgiForm(char *pos)
+/* Make a form for navigating to other CGIs. */
+{
+struct slPair *valsAndLabels = makeOtherCgiValsAndLabels();
+// Default to the first CGI in the menu.
+char *defaultCgi = valsAndLabels->name;
+printf("
");
+}
+
static void manageCustomForm(char *warn)
/* list custom tracks and display checkboxes so user can select for delete */
{
struct dbDb *dbList = getCustomTrackDatabases();
struct dbDb *dbDb = NULL;
/* add this database to the list, as it may have no custom
* tracks, but we still want to see it in the menu */
slAddTail(&dbList, hDbDb(database));
slReverse(&dbList);
/* remove duplicate entry for this database, if any */
for (dbDb = dbList->next; dbDb != NULL; dbDb = dbDb->next)
if (sameString(dbDb->name, database))
slRemoveEl(&dbList, dbDb);
@@ -714,88 +747,80 @@
/* count up number of custom tracks for this genome */
int numCts = slCount(ctList);
cgiSimpleTableStart();
cgiSimpleTableRowStart();
if (numCts)
{
puts("");
showCustomTrackList(ctList, numCts);
}
else
puts(" | No custom tracks for this genome: ");
puts(" | ");
-/* navigation buttons */
-puts("");
-puts(" |