9 /* prevent horizontal scrollbar */
13 /* IE 6 doesn't support max-height
14 * we use height instead, but this forces the menu to always be this tall
16 * html .ui-autocomplete {
21 <div class="modal fade" id="create_cross" name="create_cross" tabindex="-1" role="dialog" aria-labelledby="createNewCrossesDialog">
22 <div class="modal-dialog modal-xl" role="document">
23 <div class="modal-content ui-front">
24 <div class="modal-header">
25 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
26 <h4 class="modal-title" id="createNewCrosses">Add New Cross</h4>
28 <div class="modal-body">
29 <div class="container-fluid">
31 <&| /util/workflow.mas, id=> "add_cross_workflow" &>
32 <&| /util/workflow.mas:step, title=> "Intro" &>
33 <& /page/page_title.mas, title=>"What is a cross?" &>
36 <li>The Cross Tool can track any pollinations in a breeding program.</li>
37 <li>Each cross has a globally unique cross id.</li>
38 <li>Supported cross types are: biparental, self, open, sib, polycross, bulk, bulk_self, bulk_open, or doubled_haploid</li>
39 <li>For an open pollinated cross, the cross can be defined as between female accession A and male population P1 (populations in the database are defined strictly as groups of accessions). If the male parent is not known, it can be left blank.</li>
40 <li>An individual cross can be linked to the specific female plot or plant, as well as to the specific male plot or plant.</li>
41 <li>A cross can have other data associated to it, such as number of flowers, pollination date, etc.</li>
42 <li>Seed produced by a cross can be managed using a seedlot.</li>
43 <li>Progenies from a cross can become named accessions in the database.</li>
48 <button class="btn btn-primary" onclick="Workflow.complete(this);">Go to Next Step</button>
51 <&| /util/workflow.mas:step, title=> "Crossing Experiment" &>
52 <& /page/page_title.mas, title=>"Select a crossing experiment" &>
54 <p>Crossing experiments are for grouping crosses together. The grouping is most often done for crosses derived from the same field trial, the same year, or for crosses that have the same breeding objective.</p>
57 <div class="form-group">
58 <label class="col-sm-2 control-label">You can check your crossing experiment here: </label>
59 <div class="col-sm-10">
60 <div id="upload_crosses_select_crossingtrial_3" name="upload_crosses_select_crossingtrial_3" >
67 <button class="btn btn-info" name="create_crossingtrial_link">If you need to create a crossing experiment, click here</button><br/><br/>
68 <button class="btn btn-primary" onclick="Workflow.complete(this);">Once you have a crossing experiment, go to Next Step</button>
73 <form class="form-horizontal" role="form" name="create_cross_form" id="create_cross_form">
75 <&| /util/workflow.mas:step, title=> "Enter cross information" &>
76 <& /page/page_title.mas, title=>"Enter basic information about the cross" &>
78 <&| /page/explanation.mas, title=>'Cross Type information' &>
80 <b>Cross type information</b>
82 <a id="cross_type_info">Descriptions of cross types</a>
88 <div class="form-group">
89 <label class="col-sm-3 control-label">Crossing Experiment: </label>
90 <div class="col-sm-9">
91 <div id="upload_crosses_select_crossingtrial_4" name="upload_crosses_select_crossingtrial_4" >
96 <div class="form-group">
97 <label class="col-sm-3 control-label">Location of cross: </label>
98 <div class="col-sm-9">
99 <select class="form-control" id="location" name="location">
100 <option value="">Select Location</option>
102 # foreach my $location (@locations) {
103 # print "<option value=".'"'.@$location[1].'"'.">".@$location[1]."</option>";
105 foreach my $location_hashref (@$locations) {
106 my $properties = $location_hashref->{'properties'};
107 my $program = $properties->{'Program'};
108 my $name = $properties->{'Name'};
109 print "<option value=\"$name\" data-program=\"$program\">".$name."</option>";
116 <div class="form-group">
117 <label class="col-sm-3 control-label">Cross Unique ID: </label>
118 <div class="col-sm-9">
119 <input class="form-control" type="text" id="cross_name" name="cross_name" />
122 <div class="form-group">
123 <label class="col-sm-3 control-label">Cross Combination (optional): </label>
124 <div class="col-sm-9">
125 <input class="form-control" type="text" id="dialog_cross_combination" name="dialog_cross_combination" placeholder="e.g. female_name/male_name"/>
128 <div class="form-group">
129 <label class="col-sm-3 control-label">Cross Type: </label>
130 <div class="col-sm-9">
131 <select class="form-control" id="cross_type">
132 <option value="">Select a cross type</option>
133 <option value="biparental">biparental</option>
134 <option value="self">self</option>
135 <option value="open">open pollinated</option>
136 <option value="sib">sib</option>
137 <option value="bulk">bulk</option>
138 <option value="bulk_self">bulk selfed</option>
139 <option value="bulk_open">bulk and open pollinated</option>
140 <option value="doubled_haploid">doubled haploid</option>
141 <option value="polycross">polycross</option>
142 <option value="reciprocal">reciprocal</option>
143 <option value="multicross">multicross</option>
149 <button class="btn btn-primary" onclick="Workflow.complete(this);">Go to Next Step</button>
152 <&| /util/workflow.mas:step, title=> "Enter parentage information" &>
153 <& /page/page_title.mas, title=>"Enter basic information about the cross" &>
155 <div class="form-group" id="get_maternal_parent" style="display: none">
156 <label class="col-sm-2 control-label">Female Parent: </label>
157 <div class="col-sm-10">
158 <input class="form-control" id="maternal_parent" type="text" name="maternal" placeholder="Enter female parent name" />
161 <div class="form-group" id="get_paternal_parent" style="display: none">
162 <label class="col-sm-2 control-label">Male Parent: </label>
163 <div class="col-sm-10">
164 <input class="form-control" id="paternal_parent" type="text" name="paternal" placeholder="Enter male parent name" />
167 <div class="form-group" id="get_selfed_parent" style="display: none">
168 <label class="col-sm-2 control-label">Selfed Parent: </label>
169 <div class="col-sm-10">
170 <input class="form-control" id="selfed_parent" type="text" name="selfed" placeholder="Enter parent name" />
173 <div class="form-group" id="get_sib_parent" style="display: none">
174 <label class="col-sm-2 control-label">Sib Parent: </label>
175 <div class="col-sm-10">
176 <input class="form-control" id="sib_parent" type="text" name="sib" placeholder="Enter parent name" />
179 <div class="form-group" id="get_open_maternal_parent" style="display: none">
180 <label class="col-sm-2 control-label">Female Parent: </label>
181 <div class="col-sm-10">
182 <input class="form-control" id="open_maternal_parent" type="text" name="open maternal" placeholder="Enter female parent name" />
185 <div class="form-group" id="get_open_paternal_population" style="display: none">
186 <div class="col-sm-2"><center><label class="control-label">Male Population: </label><i>(optional)</i></center></div>
187 <div class="col-sm-10">
188 <input class="form-control" id="open_paternal_population" type="text" name="open paternal" placeholder="Enter male population name" />
191 <div class="form-group" id="get_bulk_maternal_population" style="display: none">
192 <label class="col-sm-2 control-label">Female Population: </label>
193 <div class="col-sm-10">
194 <input class="form-control" id="bulk_maternal_population" type="text" name="bulk maternal" placeholder="Enter female population name" />
197 <div class="form-group" id="get_bulk_paternal_parent" style="display: none">
198 <label class="col-sm-2 control-label">Male Parent: </label>
199 <div class="col-sm-10">
200 <input class="form-control" id="bulk_paternal_parent" type="text" name="bulk paternal" placeholder="Enter male parent name" />
203 <div class="form-group" id="get_bulk_selfed_population" style="display: none">
204 <label class="col-sm-2 control-label">Selfed Population: </label>
205 <div class="col-sm-10">
206 <input class="form-control" id="bulk_selfed_population" type="text" name="bulk selfed" placeholder="Enter parent population name" />
209 <div class="form-group" id="get_bulk_open_maternal_population" style="display: none">
210 <label class="col-sm-2 control-label">Female Population: </label>
211 <div class="col-sm-10">
212 <input class="form-control" id="bulk_open_maternal_population" type="text" name="bulk open maternal" placeholder="Enter female population name" />
215 <div class="form-group" id="get_bulk_open_paternal_population" style="display: none">
216 <div class="col-sm-2"><center><label class="control-label">Male Population: </label><i>(optional)</i></center></div>
217 <div class="col-sm-10">
218 <input class="form-control" id="bulk_open_paternal_population" type="text" name="bulk open paternal" placeholder="Enter male population name" />
221 <div class="form-group" id="get_doubled_haploid_parent" style="display: none">
222 <label class="col-sm-2 control-label">Doubled Haploid Parent: </label>
223 <div class="col-sm-10">
224 <input class="form-control" id="doubled_haploid_parent" type="text" name="doubled haploid" placeholder="Enter parent name" />
227 <div class="form-group" id="polycross_accessions" style="display: none">
228 <label class="col-sm-2 control-label">Accessions to use in Polycross: </label>
229 <div class="col-sm-10">
230 <div id="polycross_accession_list"></div>
233 <div class="form-group" id="reciprocal_accessions" style="display: none">
234 <label class="col-sm-2 control-label">Accessions to use in Reciprocal cross: </label>
235 <div class="col-sm-10">
236 <div id="reciprocal_accession_list"></div>
239 <div class="form-group" id="maternal_accessions" style="display: none">
240 <label class="col-sm-2 control-label">Multicross Female Parents: </label>
241 <div class="col-sm-10">
242 <div id="maternal_accession_list"></div>
245 <div class="form-group" id="paternal_accessions" style="display: none">
246 <label class="col-sm-2 control-label">Multicross Male Parents: </label>
247 <div class="col-sm-10">
248 <div id="paternal_accession_list"></div>
253 <button class="btn btn-primary" onclick="Workflow.complete(this);">Go to Next Step</button>
256 <&| /util/workflow.mas:step, title=> "Track exact cross parents" &>
257 <& /page/page_title.mas, title=>"Optional: If you choose to record exact cross parents, you can do so." &>
259 <div class="form-group">
260 <label class="col-sm-2 control-label">Field Trial: </label>
261 <div class="col-sm-10">
262 <div class="input-group">
263 <input type ="text" class ="form-control" id ="field_trial" placeholder="Enter trial name">
264 <div class ="input-group-btn">
265 <button class = "btn btn-info" id ="search_plots"></i>Search Plots</button>
270 <div class="form-group">
271 <label class="col-sm-2 control-label">Female Plot: </label>
272 <div class="col-sm-10">
273 <select class="form-control" id="female_plot" name="female_plot">
274 <option value="">Enter trial name first</option>
278 <div class="form-group">
279 <label class="col-sm-2 control-label">Male Plot: </label>
280 <div class="col-sm-10">
281 <select class="form-control" id="male_plot" name="male_plot">
282 <option value="">Enter trial name first</option>
287 <button class="btn btn-primary" onclick="Workflow.complete(this);">Go to Next Step</button>
290 <&| /util/workflow.mas:step, title=> "Additional cross info" &>
291 <& /page/page_title.mas, title=>"If you would like to add auto-generated progeny names for this cross, you can add it here" &>
297 <div class="form-group">
298 <label class="col-sm-9 control-label">Specify Pollination Date: </label>
299 <div class="col-sm-3">
300 <input id= "pollination_date_checkbox" type="checkbox" />
305 <div class="form-group" id="get_pollination_date" style="display: none">
306 <label class="col-sm-6 control-label">Pollination Date (YYYY/MM/DD): </label>
307 <div class="col-sm-6">
308 <input class="form-control" type="text" id="pollination_date" />
315 <div class="form-group">
316 <label class="col-sm-9 control-label">Specify Number of Flowers: </label>
317 <div class="col-sm-3">
318 <input id= "flower_number_checkbox" type="checkbox" />
321 <div class="form-group">
322 <label class="col-sm-9 control-label">Specify Number of Fruits: </label>
323 <div class="col-sm-3">
324 <input id= "fruit_number_checkbox" type="checkbox" />
329 <div class="form-group" id="get_flower_number" style="display: none">
330 <label class="col-sm-6 control-label">Number of Flowers: </label>
331 <div class="col-sm-6">
332 <input class="form-control" type="text" id="flower_number" />
335 <div class="form-group" id="get_fruit_number" style="display: none">
336 <label class="col-sm-6 control-label">Number of Fruits: </label>
337 <div class="col-sm-6">
338 <input class="form-control" type="text" id="fruit_number" />
345 <div class="form-group">
346 <label class="col-sm-9 control-label">Specify Number of Seeds: </label>
347 <div class="col-sm-3">
348 <input id= "seed_number_checkbox" type="checkbox" />
353 <div class="form-group" id="get_seed_number" style="display: none">
354 <label class="col-sm-6 control-label">Number of Seeds: </label>
355 <div class="col-sm-6">
356 <input class="form-control" type="text" id="seed_number" />
364 <div class="form-group">
365 <label title="You may choose to create accessions for the progeny of the cross at this time." class="col-sm-9 control-label">Add New Accessions for Progeny: </label>
366 <div class="col-sm-3">
367 <input id="create_progeny_checkbox" type="checkbox"/>
372 <div class="form-group" id="create_progeny_number" style="display: none">
373 <label class="col-sm-6 control-label">Number of progeny: </label>
374 <div class="col-sm-6">
375 <input class="form-control" type="text" id="progeny_number" />
380 <tr id="use_prefix_suffix" style = "display: none">
382 <div class="form-group">
383 <label class="col-sm-9 control-label">Use Prefix and/or Suffix: </label>
384 <div class="col-sm-3">
385 <input id="use_prefix_suffix_checkbox" type="checkbox" checked/>
389 <td id="get_prefix_suffix" style="display: none">
390 <div class="form-group" >
391 <label class="col-sm-6 control-label">Prefix: </label>
392 <div class="col-sm-6">
393 <input class="form-control" id="prefix" name="prefix" value="P" size="5" />
396 <div class="form-group" >
397 <label class="col-sm-6 control-label">Suffix: </label>
398 <div class="col-sm-6">
399 <input class="form-control" id="suffix" name="suffix" size="5" />
407 <button class="btn btn-primary" name="create_cross_submit" id="create_cross_submit" onclick="Workflow.complete(this, false);">Submit Cross</button>
412 <&| /util/workflow.mas:complete, title=> "Complete" &>
413 <& /page/page_title.mas, title=>"Finished! Your cross is now in the database" &>
415 <span class="ui-icon ui-icon-circle-check" style="float: left; margin: 0 7px 50px 0;"></span>
416 The cross was added successfully
420 <li>You may want to proceed to the cross detail page for the cross you just created.</li>
421 <li>You can print barcodes for the cross.</li>
422 <li>You can add crossing information as it becomes available (e.g. number of seeds, progeny, etc).</li>
426 </&><!-- End of workflow -->
429 <div class="modal-footer">
430 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
436 <div class="modal fade" id="cross_type_dialog" name="cross_type_dialog" tabindex="-1" role="dialog" aria-labelledby="crossTypeDialog">
437 <div class="modal-dialog modal-lg" role="document">
438 <div class="modal-content">
439 <div class="modal-header">
440 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
441 <h4 class="modal-title" id="crossTypeDialog">Template Information</h4>
443 <div class="modal-body">
444 <div class="container-fluid">
449 <p><b>biparental:</b> An individual plant pollinated by another individual plant.<p>
450 <p><b>self:</b> A self pollinated individual plant.<p>
451 <p><b>open pollinated:</b> An individual plant pollinated by a group of plants or open pollinated (pollen may be from a group with known or unknown members).<p>
452 <p><b>sib:</b> Mating between individuals that have at least one parent in common. Generally between two individuals within the same plot.<p>
453 <p><b>bulk:</b> A group of plants (usually a related family) pollinated by an individual plant.<p>
454 <p><b>bulk selfed:</b> A group of plants (usually a related family) that are self pollinated (each individual selfed, not combined pollen).<p>
455 <p><b>bulk and open pollinated:</b> A group of plants (usually a related family) that are pollinated by another group of plants or open pollinated (pollen may be from a group with known or unknown members).<p>
456 <p><b>doubled haploid:</b> Plants derived from doubling the chromosome number of haploid tissue.<p>
463 <p><b>polycross:</b> Creates a group of open pollinated crosses. Each accession in the selected list becomes the female parent in an open cross, and all the members of the list grouped together form the male parent.<p>
464 <p><b>reciprocal:</b> Creates a group of biparental crosses. Starting with a list of accessions, all possible biparental cross combinations are made between them.<p>
465 <p><b>multicross:</b> Creates a group of biparental crosses. Starting with a list of maternal accessions and a list of paternal accessions, direct crosses are made in order.<p>
468 <div class="modal-footer">
469 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
475 <div class="modal fade" id="cross_saved_dialog_message" name="cross_saved_dialog_message" tabindex="-1" role="dialog" aria-labelledby="crossSavedDialog">
476 <div class="modal-dialog" role="document">
477 <div class="modal-content">
478 <div class="modal-header">
479 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
480 <h4 class="modal-title" id="crossSavedDialog">Success</h4>
482 <div class="modal-body">
483 <div class="container-fluid">
485 <span class="ui-icon ui-icon-circle-check" style="float: left; margin: 0 7px 50px 0;"></span>
486 The cross or crosses were saved successfully.
490 <div class="modal-footer">
491 <button id="dismiss_cross_saved_dialog" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
501 jQuery(document).ready(function($) {
503 jQuery("#field_trial").autocomplete({
504 source:'/ajax/stock/project_autocomplete',
507 $("#search_plots").click(function(e){
511 if ($('#maternal_parent').val() != ''){
512 maternal_parent = $('#maternal_parent').val();
515 if ($('#selfed_parent').val() != ''){
516 maternal_parent = $('#selfed_parent').val();
519 if ($('#open_maternal_parent').val() != ''){
520 maternal_parent = $('#open_maternal_parent').val();
523 if ($('#sib_parent').val() != ''){
524 maternal_parent = $('#sib_parent').val();
527 console.log(maternal_parent);
530 url:'/ajax/breeders/get_accession_plots',
531 data:{'field_trial':$('#field_trial').val(),
532 'parent_accession':maternal_parent,
534 success: function(response){
535 console.log(response);
536 var html = '<select id = "female_plot" >';
537 for (var i=0; i<response.data.length; i++) {
538 html = html + "<option value='"+response.data[i][0]+ "'>" + response.data[i][1] + "</option>";
540 html = html + "</select>";
548 jQuery('#female_plot').html(html);
551 error:function(response){
552 alert("An error occurred getting female plots.");
558 if ($('#paternal_parent').val() != ''){
559 paternal_parent = $('#paternal_parent').val();
562 if ($('#selfed_parent').val() != ''){
563 paternal_parent = $('#selfed_parent').val();
566 if ($('#sib_parent').val() != ''){
567 paternal_parent = $('#sib_parent').val();
571 url:'/ajax/breeders/get_accession_plots',
572 data:{'field_trial':$('#field_trial').val(),
573 'parent_accession':paternal_parent,
575 success: function(response){
576 console.log(response);
577 var html = '<select id = "male_plot" >';
578 for (var i=0; i<response.data.length; i++) {
579 html = html + "<option value='"+response.data[i][0]+ "'>" + response.data[i][1] + "</option>";
581 html = html + "</select>";
589 jQuery('#male_plot').html(html);