diff --git a/src/couchapp/secreton/_attachments/index.html b/src/couchapp/secreton/_attachments/index.html index 541ff920725429db0ad7871451fcb75be2b631f0..f7ee4956d500e63d4391fc7198595da1d3263505 100644 --- a/src/couchapp/secreton/_attachments/index.html +++ b/src/couchapp/secreton/_attachments/index.html @@ -19,6 +19,11 @@ </select> <button type="button" id="nameButton">search by name</button> </fieldset> + <fieldset> + <label for="taxidSearch">by replicon taxon id (ex:155864)</label> + <input type="text" name="taxidSearch" id="taxidInput"/> + <button type="button" id="taxidButton">search by taxid</button> + </fieldset> </form> </div> <div id="results"> @@ -62,11 +67,15 @@ $(".tooltip" , "#results").live('mouseenter', function(){ get_results( 'by_replicon_name', $.param(params)); }); + $("#taxidButton").click( function(){ + var params = {limit:45+1}; + var key= $("#taxidInput").attr("value"); + if( key ){ params.key=key} + get_results( 'by_replicon_taxid', $.param(params)); + }); $("#paginate .nav_page").live( 'click', function(){ - console.log('paginate click' ); var url = $(this).attr('data-href'); - console.log("url="+url); $("#results").load( url ); }); diff --git a/src/couchapp/secreton/views/by_replicon_taxid/map.js b/src/couchapp/secreton/views/by_replicon_taxid/map.js index cb1a9c92140cdd47701ce30530612f268d995661..254578b0f846993bb6a304d8ad21187f150f4a05 100644 --- a/src/couchapp/secreton/views/by_replicon_taxid/map.js +++ b/src/couchapp/secreton/views/by_replicon_taxid/map.js @@ -1,3 +1,12 @@ function(doc) { - emit(doc.replicon.taxid, doc._id); + emit(doc.replicon.taxid, { + "id" : doc._id, + "code" : doc.code , + "name" : doc.replicon.name , + "T3SS_family" : doc.T3SS_family, + "taxid" : doc.replicon.taxid, + "strain" : doc.replicon.strain , + "taxonomy" : doc.replicon.taxonomy.join( ", ") , + "type" : doc.replicon.type + }); } \ No newline at end of file