5 <& /util/import_javascript.mas, classes => [ 'jquery', 'jquery.dataTables' ] &>
7 <& /page/page_title.mas, title => "Genotyping Data Project Search" &>
9 <div class="well well-sm">
10 <div class="panel panel-default">
11 <div class="panel-body">
12 <table id="genotyping_data_project_search_results" width="100%" class="table table-hover table-striped">
15 <th>Genotyping Data Project Name</th>
17 <th>Breeding program</th>
21 <th>Genotyping Facility</th>
28 <div class="panel panel-default">
29 <div class="panel-body">
31 <&| /page/info_section.mas, title => 'Copy Results to a List', collapsible=>1, collapsed=>0, subtitle=>'<i>Copy the trial names currently showing in the search results table to a new or exisiting list</i>'&>
33 <div style="text-align:right" id="genotyping_data_project_to_list_menu"></div>
34 <div id="genotyping_data_project_result_names" style="display: none;"></div>
43 jQuery(document).ready(function () {
45 var trial_table = jQuery('#genotyping_data_project_search_results').DataTable( {
46 'ajax': '/ajax/genotyping_data_project/search',
50 jQuery('#genotyping_data_project_search_results').on( 'draw.dt', function () {
51 var name_links = trial_table.column( 0, {page:'current'} ).data();
54 for (var i = 0; i < name_links.length; i++) { //extract text from anchor tags
55 names.push(name_links[i].match(/<a [^>]+>([^<]+)<\/a>/)[1]+'\n');
58 jQuery('#genotyping_data_project_result_names').html(names);
59 addToListMenu('genotyping_data_project_to_list_menu', 'genotyping_data_project_result_names', {