210475cabfa3e25848958cfda5e1fccad7ac961e larrym Tue Jun 19 15:45:25 2012 -0700 enable MERGE_GENE_SUGGEST; remove jumpButtonOnClick from submit button b/c it is no longer needed with merged suggest; change 1em to 0.3em spacing to save some real estate diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 695bf16..4ec03f1 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -68,31 +68,31 @@ "hgt.in1", "hgt.in2", "hgt.in3", "hgt.inBase", "hgt.out1", "hgt.out2", "hgt.out3", "hgt.left1", "hgt.left2", "hgt.left3", "hgt.right1", "hgt.right2", "hgt.right3", "hgt.dinkLL", "hgt.dinkLR", "hgt.dinkRL", "hgt.dinkRR", "hgt.tui", "hgt.hideAll", "hgt.visAllFromCt", "hgt.psOutput", "hideControls", "hgt.toggleRevCmplDisp", "hgt.collapseGroups", "hgt.expandGroups", "hgt.suggest", "hgt.jump", "hgt.refresh", "hgt.setWidth", "hgt.trackImgOnly", "hgt.ideogramToo", "hgt.trackNameFilter", "hgt.imageV1", "hgt.suggestTrack", "hgt.setWidth", TRACK_SEARCH, TRACK_SEARCH_ADD_ROW, TRACK_SEARCH_DEL_ROW, TRACK_SEARCH_PAGER, "hgt.contentType", "hgt.positionInput", "hgt.internal", NULL }; // MERGE_GENE_SUGGEST is used for work on redmine #5933 -// #define MERGE_GENE_SUGGEST +#define MERGE_GENE_SUGGEST /* These variables persist from one incarnation of this program to the * next - living mostly in the cart. */ boolean baseShowPos; /* TRUE if should display full position at top of base track */ boolean baseShowAsm; /* TRUE if should display assembly info at top of base track */ boolean baseShowScaleBar; /* TRUE if should display scale bar at very top of base track */ boolean baseShowRuler; /* TRUE if should display the basic ruler in the base track (default) */ char *baseTitle = NULL; /* Title it should display top of base track (optional)*/ static char *userSeqString = NULL; /* User sequence .fa/.psl file. */ /* These variables are set by getPositionFromCustomTracks() at the very * beginning of tracksDisplay(), and then used by loadCustomTracks(). */ char *ctFileName = NULL; /* Custom track file. */ struct customTrack *ctList = NULL; /* Custom tracks. */ boolean hasCustomTracks = FALSE; /* whether any custom tracks are for this db*/ @@ -4495,31 +4495,31 @@ hButtonWithOnClick("hgt.left2", " <<", "move 47.5% to the left", "return imageV2.navigateButtonClick(this);"); hButtonWithOnClick("hgt.left1", " < ", "move 10% to the left", "return imageV2.navigateButtonClick(this);"); hButtonWithOnClick("hgt.right1", " > ", "move 10% to the right", "return imageV2.navigateButtonClick(this);"); hButtonWithOnClick("hgt.right2", ">> ", "move 47.5% to the right", "return imageV2.navigateButtonClick(this);"); hButtonWithOnClick("hgt.right3", ">>>", "move 95% to the right", "return imageV2.navigateButtonClick(this);"); hWrites(" zoom in "); /* use button maker that determines padding, so we can share constants */ topButton("hgt.in1", ZOOM_1PT5X); topButton("hgt.in2", ZOOM_3X); topButton("hgt.in3", ZOOM_10X); topButton("hgt.inBase", ZOOM_BASE); hWrites(" zoom out "); topButton("hgt.out1", ZOOM_1PT5X); topButton("hgt.out2", ZOOM_3X); topButton("hgt.out3", ZOOM_10X); - hWrites("<div style='height:1em;'></div>\n"); + hWrites("<div style='height:0.3em;'></div>\n"); #endif//ndef USE_NAVIGATION_LINKS if (showTrackControls) { /* Break into a second form so that zooming and scrolling * can be done with a 'GET' so that user can back up from details * page without Internet Explorer popping up an annoying dialog. * Do rest of page as a 'POST' so that the ultra-long URL from * all the track controls doesn't break things. IE URL limit * is 2000 bytes, but some firewalls impose a ~1000 byte limit. * As a side effect of breaking up the page into two forms * we need to repeat the position in a hidden variable here * so that zoom/scrolling always has current position to work * from. */ // This 'dirty' field is used to check if js/ajax changes to the page have occurred. @@ -4551,31 +4551,31 @@ if (containsStringNoCase(database, "zoo")) { hPuts("Organism "); printAssemblyListHtmlExtra(database, javascript); } sprintf(buf, "%s:%d-%d", chromName, winStart+1, winEnd); position = cloneString(buf); #ifdef MERGE_GENE_SUGGEST hPrintf("<span class='positionDisplay' id='positionDisplay' title='click to copy position to input box'>%s</span>", addCommasToPos(database, position)); hPrintf("<input type='hidden' name='position' id='position' value='%s'>\n", buf); sprintLongWithCommas(buf, winEnd - winStart); hPrintf(" <span id='size'>%s</span> bp. ", buf); hPrintf("<input class='positionInput' type='text' name='hgt.positionInput' id='positionInput' size='60'>\n"); hWrites(" "); - hButtonWithOnClick("hgt.jump", "go", NULL, "imageV2.jumpButtonOnClick()"); + hButton("hgt.jump", "go"); jsonObjectAdd(jsonForClient, "assemblySupportsGeneSuggest", newJsonBoolean(assemblySupportsGeneSuggest(database))); if(assemblySupportsGeneSuggest(database)) hPrintf("<input type='hidden' name='hgt.suggestTrack' id='suggestTrack' value='%s'>\n", assemblyGeneSuggestTrack(database)); #else///ifndef MERGE_GENE_SUGGEST hWrites("position/search "); hTextVar("position", addCommasToPos(database, position), 30); sprintLongWithCommas(buf, winEnd - winStart); if(assemblySupportsGeneSuggest(database)) hPrintf(" <a title='click for help on gene search box' target='_blank' href='../goldenPath/help/geneSearchBox.html'>gene</a> " "<input type='text' size='8' name='hgt.suggest' id='suggest'>\n" "<input type='hidden' name='hgt.suggestTrack' id='suggestTrack' value='%s'>\n", assemblyGeneSuggestTrack(database) ); hWrites(" "); hButtonWithOnClick("hgt.jump", "jump", NULL, "imageV2.jumpButtonOnClick()"); hOnClickButton(clearButtonJavascript,"clear");