3 $feature_types => undef
6 <& /util/import_javascript.mas, classes => 'SGN.Search.Feature' &>
9 <& /util/import_javascript.mas, classes => [ 'jquery', 'jquery.dataTables' ] &>
11 <div class="container-fluid">
13 <& /page/page_title.mas, title=>'Search genomic sequences and annotations' &>
17 use CXGN::Page::FormattingHelpers qw / simple_selectbox_html/;
19 my $f_type_select = simple_selectbox_html(
20 choices => $feature_types,
21 id => "feature_type_select",
24 my $organism_select = simple_selectbox_html(
25 choices => $organisms ,
26 id => "organism_select",
31 <&| /page/info_section.mas, title => 'Search', collapsible=>1, collapsed=>0 &>
32 <div id="feature_search_form" class="form-horizontal well">
34 <div class="col-sm-6">
35 <div class="form-group form-group-sm">
36 <label class="col-sm-3 control-label">Organism: </label>
37 <div class="col-sm-9" >
38 <% $organism_select %>
42 <div class="col-sm-6">
43 <div class="form-group form-group-sm">
44 <label class="col-sm-3 control-label">Type: </label>
45 <div class="col-sm-9" >
52 <div class="col-sm-6">
53 <div class="form-group form-group-sm">
54 <label class="col-sm-3 control-label">Name: </label>
55 <div class="col-sm-9" >
56 <input type="text" class="form-control" id="name" />
60 <div class="col-sm-6">
61 <div class="form-group form-group-sm">
62 <label class="col-sm-3 control-label">Description: </label>
63 <div class="col-sm-9" >
64 <input type="text" class="form-control" id="description" />
69 <button style="float:right" class="btn btn-primary" id="submit_feature_search" />Search</button>
76 <&| /page/info_section.mas, title => 'Search Results', collapsible=>1, collapsed=>0 &>
80 <table id="feature_search_results" class="display">
97 jQuery(document).ready(function () {
99 var table = jQuery('#feature_search_results').DataTable( {
105 'ajax': { 'url': '/ajax/search/features',
106 'data': function(d) {
107 d.organism = jQuery('#organism_select').val();
108 d.type_id = jQuery('#feature_type_select').val();
109 d.name = jQuery('#name').val();
110 d.description = jQuery('#description').val();
117 jQuery('#submit_feature_search').click( function() {
118 var organism = jQuery('#organism_select').val();
119 var type_id = jQuery('#feature_type_select').val();
120 var name = jQuery('#name').val();
121 var description = jQuery('#description').val();
123 table.search("feature_search_results").draw();
126 jQuery('#feature_search_form').keypress( function( e ) {
127 var code = e.keyCode || e.which;
129 jQuery('#submit_feature_search').click();