fe68c1b1ff0235428aefefd9e8f68679f73f3fd6
hiram
  Sat Aug 17 07:16:35 2024 -0700
initial prototype code for assemblySearch function refs #32596

diff --git src/hg/htdocs/assemblySearch.html src/hg/htdocs/assemblySearch.html
new file mode 100755
index 0000000..fba6dc0
--- /dev/null
+++ src/hg/htdocs/assemblySearch.html
@@ -0,0 +1,109 @@
+<!DOCTYPE HTML>
+<!--#set var="TITLE" value="prototype assembly search page" -->
+<!--#set var="ROOT" value="../.." -->
+
+<!--#include virtual='$ROOT/inc/gbPageStartHardcoded.html' -->
+
+<link rel="stylesheet" type="text/css" href="search.css">
+
+    <h1>Assembly search page</h1>
+<hr>
+    <p>When a browser exists, the <b>name</b> column will be a link to
+       that browser.<br>
+       TO BE DONE: when browser doesn't exist: pop-up request form
+    </p>
+    <form id="searchForm">
+        <div class="formDiv">
+        <div>
+        <label for="searchBox">Enter search term(s) to find assembly:</label>
+        <input type="text" id="searchBox" name="searchBox" required>
+        <div class="submitContainer">
+           <button id="submitButton" type="submit">Search</button>
+           <div id="loadingSpinner" class="spinner"></div>
+        </div>
+        <button type="button" id="clearSearch">Clear</button>
+        <label for="limitResultCount">limit results to:
+        <select id="limitResultCount" name="limitResultCount">
+           <option value="10">10</option>
+           <option value="20">20</option>
+           <option value="50">50</option>
+           <option value="100">100</option>
+           <option value="200">200</option>
+           <option value="500">500</option>
+        </select>
+        count</label>
+        </div>
+        <div class="radioGroupContainer">
+           <div class="radioGroup">
+           <label><input type="radio" name="browserExist" value="mustExist" checked>
+              show results only when browser is available
+           </label><br>
+           <label><input type="radio" name="browserExist" value="mayExist">
+              show results when browser is available or assembly can be requested
+           </label><br>
+           <label><input type="radio" name="browserExist" value="notExist">
+              show results only for assemblies that can be requested
+           </label>
+           </div>
+           <div class="radioGroup">
+              <label>may match any word <input type="radio" name="wordMatch" value="anyWord" checked></label>
+              <label>must match all words <input type="radio" name="wordMatch" value="allWords"></label>
+               <span class="searchtip">advanced search tips
+      <span class="searchtiptext">
+<ol class="noBullets">
+<li> + (plus) sign before <b>+word</b> to force included in result</li>
+<li> - (minus) sign before <b>-word</b> to exclude word from result</li>
+<li> * (asterisk) character at end of <b>word*</b> to make the word be a prefix search</li>
+<li> enclose "words in quotes" to form a phrase for the search</li>
+<li> all searches are case insensitive</li>
+<li> single word searches become prefix searches if the word does not match by itself </li>
+</ol>
+</span>
+               </span>
+           </div>
+        </div>
+        </div>
+    </form>
+    <div>
+    <p><b>results for search string: '</b><span id="searchString">&nbsp;</span>',
+    <b>total matching: </b><span id="matchCounts">0</span>,
+    <b>from total number of assemblies: </b><span id="availableAssemblies">0</span>,
+    <b>search time: </b><span id="elapsedTime">0 milliseconds</span>.
+    </p>
+    </div>
+    <hr>
+    <table id="dataTable" class="sorttable fifthRowHighlight" style="border: 1px solid black; display:block; max-height: 800px; max-width:1300px; overflow:auto; position:sticky; top:0;">
+        <colgroup>
+          <col style="width: 5%">
+          <col style="width: 10%">
+          <col style="width: 10%">
+          <col style="width: 20%">
+          <col style="width: 8%">
+          <col style="width: 47%">
+        </colgroup>
+        <thead style="position:sticky; top:0; border:1px solid #ddd; width:100%" id="tableHeader">
+         <tr><th>count</th>
+         <th>name</th>
+         <th>scientificName</th>
+         <th>commonName</th>
+         <th>clade</th>
+         <th>description</th>
+         </tr>
+        </thead>
+        <tbody id="tableBody"></tbody>
+    </table>
+    </hr>
+    <div id="metaData">
+    </div>
+    </hr>
+
+    <!-- Include external JavaScript file -->
+    <script src="/~hiram/genomeSearch/scripts.js"></script>
+
+<hr />
+<!--#include virtual='$ROOT/inc/garModal.html' -->
+</div><!-- closing gbsPage from gbPageStartHardcoded.html -->
+</div><!-- closing container-fluid from gbPageStartHardcoded.html -->
+<!--#include virtual="$ROOT/inc/gbFooterHardcoded.html"-->
+<script src="sorttable.js"></script>
+</body></html>