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.BreedersToolbox.UploadImages', '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/upload_images.mas &>
21 <& /breeders_toolbox/trial/create_spreadsheet_dialog.mas &>
25 <&| /page/info_section.mas, title=>'Your Uploaded Files', is_subsection=>1, subtitle=>'[<a id="upload_spreadsheet_phenotypes_link" >Upload Phenotype Spreadsheet</a>] [<a id="upload_images_link" >Upload Images</a>] <br/> [<a name="create_spreadsheet_link" >Create Phenotype Spreadsheet</a>]' &>
27 <& /breeders_toolbox/file_list.mas, files=>$phenotype_files, allow_delete=>1 &>
34 <&| /page/info_section.mas, title=>'Your Obsoleted Files', subtitle=>'These files will not be shown anywhere else on the website', is_subsection=>1 &>
36 <& /breeders_toolbox/file_list.mas, files=>$deleted_phenotype_files, allow_delete=>0 &>
46 jQuery(document).ready(function() {
48 jQuery('button[name=delete_pheno_file_link]').click( function() {
49 var delete_phenotypes_file_id = jQuery(this).data('file_id');
50 if (confirm('Are you sure you want to delete all phenotype values related to this file from the database and make this file obsolete?')){
52 url : '/ajax/breeders/phenotyping/delete/'+delete_phenotypes_file_id,
53 beforeSend : function() {
54 jQuery('#working_modal').modal('show');
56 success: function(response){
57 jQuery('#working_modal').modal('hide');
58 alert('Made phenotype file obsolete and deleted all related phenotype values in the database!');
61 error: function(response){
62 jQuery('#working_modal').modal('hide');
63 alert("Error deleting file and phenotypes!");