Commit eb2cec6b authored by Bertrand  NÉRON's avatar Bertrand NÉRON

reorder the input fields

fix bug in taxidInput
a request is send only if the user data is an integer
if not display a warning message
parent 84dba8fd
......@@ -21,7 +21,7 @@
<p>Non-Flagellar Type III Secretion Systems (NF-T3SS, or injectisomes) are bacterial machineries partially homologous to the bacterial flagellum,
which allow direct injection of bacterial effectors from bacterial cytoplasm to eukaryotic cells via a molecular needle (cf. schema above).
NF-T3SS are found in animal and plant pathogens (<span class="gene_name">Yersinia pestis</span>,<span class="gene_name">Escherichia coli</span>, <span class="gene_name">Burkholderia</span>,...),
but also in plant and insect symbionts (e.g., <span class="gene_name">Rhizobiales</span>).</p>
but also in plant and insect symbionts (e.g., Rhizobiales).</p>
<p>This website allows to query a dataset of 216 NF-T3SS retrieved from 1385 complete genome sequences.
These systems were detected with proteic profiles of NF-T3SS core genes (<span class="gene_name">sctC</span>, <span class="gene_name">sctN</span>, <span class="gene_name">sctJ</span>,
<span class="gene_name">sctQ</span>, <span class="gene_name">sctR</span>, <span class="gene_name">sctS</span>, <span class="gene_name">sctT</span>,
......@@ -37,33 +37,34 @@
<form>
<fieldset>
<legend>Detected NF-T3SS can be queried: </legend>
<label for="nameSearch">by replicon name (ex:BUMA001c02)
<input type="text" name="nameSearch" id="nameInput"class="ui-widget ui-corner-all" />
<select name="queryType" id="nameQueryType"class="ui-widget ui-corner-all ui-state-default">
<option value="is" selected="selected" class="ui-widget ui-corner-all ">is</option>
<option value="start_with" class="ui-widget ui-corner-all ">start_with</option>
</select>
<button type="button" id="nameButton">search by name</button>
</label>
<label for="taxidSearch">by replicon taxon id (ex:155864)
<input type="text" name="taxidSearch" id="taxidInput" class="ui-widget ui-corner-all" />
<button type="button" id="taxidButton">search by taxid</button>
</label>
<label for="famillySearch">by T3SS family
<select name="familySearch" id="familyList" class="ui-widget ui-corner-all ui-state-default"> </select>
</label>
<label for="strainSearch">by strain
<label for="strainSearch">by strain <span style="font-size:smaller; font-style:italic;">(enter at least 3 characters)</span>
<input type="text" name="strainSearch" id="strainInput" size="100" class="ui-widget ui-corner-all" />
</label>
<label for="taxonomySearch">by taxonomy
<label for="taxonomySearch">by taxonomy <span style="font-size:smaller; font-style:italic;">(enter at least 3 characters)</span>
<input type="text" name="taxonomySearch" id="taxonomyInput" size="50" class="ui-widget ui-corner-all" />
</label>
<label for="famillySearch">by T3SS family
<select name="familySearch" id="familyList" class="ui-widget ui-corner-all ui-state-default"> </select>
</label>
<label for="nameSearch">by replicon name (ex:BUMA001c02)
<input type="text" name="nameSearch" id="nameInput"class="ui-widget ui-corner-all" />
<select name="queryType" id="nameQueryType"class="ui-widget ui-corner-all ui-state-default">
<option value="is" selected="selected" class="ui-widget ui-corner-all ">is</option>
<option value="start_with" class="ui-widget ui-corner-all ">start_with</option>
</select>
<button type="button" id="nameButton">search by name</button>
</label>
</fieldset>
</form>
</div>
<div id="results"></div>
<div id="footer">
Visit our website:<a href="http://www.pasteur.fr/ip/easysite/pasteur/en/research/scientific-departments/genomes-and-genetics/units-and-groups/evolutionary-microbial-genomics/index">Microbial evolutionary genomics group</a>
Visit our website: <a href="http://www.pasteur.fr/ip/easysite/pasteur/en/research/scientific-departments/genomes-and-genetics/units-and-groups/evolutionary-microbial-genomics/index">Microbial evolutionary genomics group</a>
</div>
</body>
<script type="text/javascript">
......@@ -112,7 +113,14 @@ $(".tooltip a" , "#results").live('mouseenter', function(){
$("#taxidButton").click( function(){
var params = {};
var key= $.trim($("#taxidInput").attr("value"));
if( key ){ params.key = key}
if( key ){
if ( /^\d+$/.test( key )){
params.key = key ;
} else{
$("#results").html( '<ul>Invalid taxon id:'+key+'</ul>');
return ;
}
}
get_results( 'by_replicon_taxid', params);
});
......@@ -130,7 +138,7 @@ $(".tooltip a" , "#results").live('mouseenter', function(){
});
$.getJSON( "_view/t3ss_family" , {group:true}, function(response){
var html = '<option value="" class="ui-widget ui-corner-all ui-widget-content">chose a T3SS Family</option>\n';
var html = '<option value="" class="ui-widget ui-corner-all ui-widget-content">choose a T3SS Family</option>\n';
for ( var i=0 ; i< response.rows.length ; i++){
html = html+'<option value="'+response.rows[i].key+'" class="ui-widget ui-corner-all">'+response.rows[i].key+'</option>\n';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment