3 $phenotype_files => undef
4 $deleted_phenotype_files => undef
8 <& /util/import_javascript.mas, classes => [ 'CXGN.BreedersToolbox.Trial','CXGN.BreedersToolbox.FieldBook','CXGN.BreedersToolbox.UploadPhenotype', 'CXGN.BreederSearch', 'CXGN.Trial' ] &>
10 <& /page/page_title.mas, title=>"Manage Phenotypic Data" &>
12 <div class="container-fluid">
14 <!--button class="btn btn-info" onclick=location.href="/search/stocks">Phenotype Search</button><br /><br /-->
16 <& /fieldbook/create_fieldbook_dialog.mas &>
17 <& /fieldbook/create_trait_file_dialog.mas &>
18 <& /fieldbook/upload_phenotype_fieldbook.mas &>
19 <& /breeders_toolbox/upload_phenotype_spreadsheet.mas &>
20 <& /breeders_toolbox/trial/create_spreadsheet_dialog.mas &>
24 <&| /page/info_section.mas, title=>'Your Uploaded Files', is_subsection=>1, subtitle=>'[<a id="upload_fieldbook_phenotypes_link" >Upload Fieldbook Database File</a>] [<a id="upload_spreadsheet_phenotypes_link" >Upload Spreadsheet</a>]<br/>[<a name="create_fieldbook_link" >Create Fieldbook Layout File</a>] [<a id="create_new_trait_file_link" >Create Fieldbook Trait File</a>]<br/>[<a name="create_spreadsheet_link" >Create Spreadsheet</a>]' &>
26 <& /breeders_toolbox/file_list.mas, files=>$phenotype_files, allow_delete=>1 &>
33 <&| /page/info_section.mas, title=>'Your Obsoleted Files', subtitle=>'These files will not be shown anywhere else on the website', is_subsection=>1 &>
35 <& /breeders_toolbox/file_list.mas, files=>$deleted_phenotype_files, allow_delete=>0 &>
45 jQuery(document).ready(function() {
47 jQuery('button[name=delete_pheno_file_link]').click( function() {
48 var delete_phenotypes_file_id = jQuery(this).data('file_id');
49 if (confirm('Are you sure you want to delete all phenotype values related to this file from the database and make this file obsolete?')){
51 url : '/ajax/breeders/phenotyping/delete/'+delete_phenotypes_file_id,
52 beforeSend : function() {
53 jQuery('#working_modal').modal('show');
55 success: function(response){
56 jQuery('#working_modal').modal('hide');
57 alert('Made phenotype file obsolete and deleted all related phenotype values in the database!');
60 error: function(response){
61 jQuery('#working_modal').modal('hide');
62 alert("Error deleting file and phenotypes!");