748b06ac95ff2a3957be3845bd3594984e3cc3cf
chmalee
  Wed Aug 17 19:21:48 2022 -0700
Rename test cgi to official name. Always search everything, only show
categories that have matches in the result list. Add /search endpoint to
hubApi, add code to search help docs in hgSuggest but don't call it yet
in autoComplete.js. Minor fixups so search result links work correctly.

Fixing up old programs that call hgPositionsFind

diff --git src/hg/js/hgGateway.js src/hg/js/hgGateway.js
index 974cb51..110ca03 100644
--- src/hg/js/hgGateway.js
+++ src/hg/js/hgGateway.js
@@ -1521,31 +1521,31 @@
             // Make a form and submit it.  In order for this to work in IE, the form
             // must be appended to the body.
             $form = $('<form action="hgTracks" method=GET id="mainForm">' +
                       '<input type=hidden name="hgsid" value="' + window.hgsid + '">' +
                       '<input type=hidden name="org" value="' + uiState.genome + '">' +
                       '<input type=hidden name="db" value="' + uiState.db + '">' +
                       '<input type=hidden name="position" value="' + position + '">' +
                       '<input type=hidden name="pix" value="' + pix + '">' +
                       '</form>');
             $('body').append($form);
             $form.submit();
         } else {
             // User has entered a search term with no suggestion, go to the disambiguation
             // page so the user can choose a position
             $('.jwGoIcon').removeClass('fa-play').addClass('fa-spinner fa-spin');
-            window.location.assign("../cgi-bin/searchExample?hgsid="+ window.hgsid + "&search=" + searchTerm);
+            window.location.assign("../cgi-bin/hgSearch?hgsid="+ window.hgsid + "&search=" + searchTerm);
         }
     }
 
     function replaceHgsidInLinks() {
         // Substitute '$hgsid' with real hgsid in <a> href's.
         $('a').each(function(ix, aEl) {
             var href = aEl.getAttribute('href');
             if (href && href.indexOf('$hgsid') >= 0) {
                 aEl.setAttribute('href', href.replace('$hgsid', window.hgsid));
             }
         });
     }
 
     function displaySurvey() {
         // If hg.conf specifies a survey link, then hgGateway.c has set corresponding global vars.