d7f7f3ef35b6fe87e22e646b8cba6dc4bc667768 larrym Mon Jun 25 11:21:44 2012 -0700 integrate suggest into the position box diff --git src/hg/hgGateway/hgGateway.c src/hg/hgGateway/hgGateway.c index 1b07885..aae3bf9 100644 --- src/hg/hgGateway/hgGateway.c +++ src/hg/hgGateway/hgGateway.c @@ -49,107 +49,99 @@ then remove custom track data which will be irrelevant in this new database . If databases were changed then use the new default position too. */ if (sameString(position, "genome") || sameString(position, "hgBatch")) position = defaultPosition; jsIncludeFile("jquery.js", NULL); webIncludeResourceFile("jquery-ui.css"); jsIncludeFile("jquery-ui.js", NULL); jsIncludeFile("ajax.js", NULL); jsIncludeFile("autocomplete.js", NULL); jsIncludeFile("hgGateway.js", NULL); jsIncludeFile("utils.js", NULL); +jsIncludeFile("jquery.watermarkinput.js", NULL); puts( "
" "The UCSC Genome Browser was created by the \n" "Genome Bioinformatics Group of UC Santa Cruz.\n" "
" "Software Copyright (c) The Regents of the University of California.\n" "All rights reserved.\n" "
\n" ); puts( "
\n" "
" "\n" "\n"); puts( ""); } // configure button puts(""); // clear possition button puts(""); puts("
\n"); cgiMakeHiddenVar(hgHubConnectCgiDestUrl, "../cgi-bin/hgTracks"); puts(""); if (gotClade) puts(""); puts( "\n" "\n" "\n"); -if(supportsSuggest) - puts("\n"); puts( "\n" "\n" ); if (gotClade) { puts("\n"); } puts("\n"); puts("\n"); puts("\n"); -if(supportsSuggest) - { - puts("\n"); - } - cartSetString(cart, "position", position); cartSetString(cart, "db", db); cartSetString(cart, "org", organism); if (gotClade) cartSetString(cart, "clade", clade); freez(&defaultPosition); position = NULL; puts("\n" "
cladegenomeassemblyposition or search termgene  
\n"); printCladeListHtml(organism, onChangeClade); puts("\n"); if (gotClade) printGenomeListForCladeHtml(db, onChangeOrg); else printGenomeListHtml(db, onChangeOrg); puts("\n"); printAssemblyListHtml(db, onChangeDB); puts("\n"); -cgiMakeTextVar("position", addCommasToPos(db, position), 30); +hPrintf("%s", addCommasToPos(db, position)); +hPrintf("\n", addCommasToPos(db, position)); +hPrintf("\n"); +if(assemblySupportsGeneSuggest(db)) + hPrintf("\n", assemblyGeneSuggestTrack(db)); printf("\n"); - hPrintf("\n" - "\n", assemblyGeneSuggestTrack(db) - ); - printf(""); -if(supportsSuggest) - hButtonWithOnClick("Submit", "submit", NULL, "submitButtonOnClick()"); -else - cgiMakeButton("Submit", "submit"); +hButton("Submit", "submit"); + /* This is a clear submit button that browsers will use by default when enter is pressed in position box. FIXME: This should be done with js onchange event! */ printf(""); cartSaveSession(cart); /* Put up hgsid= as hidden variable. */ puts( "
\n" "

\n" "Click here to reset the browser user interface settings to their defaults."); #define SURVEY 1 #ifdef SURVEY if (survey && differentWord(survey, "off")) @@ -190,31 +182,31 @@ { puts("
"); printf("\n", "../cgi-bin/hgHubConnect", "track hubs", "Import tracks"); puts(""); cgiMakeButtonWithMsg("hgTracksConfigPage", "configure tracks and display","Configure track selections and browser display"); puts(""); if(supportsSuggest) - cgiMakeOnClickButton("document.mainForm.position.value=''; document.getElementById('suggest').value='';", "clear position"); + cgiMakeOnClickButton("document.mainForm.position.value=''; document.getElementById('positionInput').value='';", "clear position"); else cgiMakeOnClickButton("document.mainForm.position.value=''", "clear position"); puts("
"); puts("
\n" "\n" ); puts(""); if(!cartVarExists(cart, "pix")) // put a hidden input for pix on page so default value can be filled in on the client side hPrintf("\n");