6 <& /util/import_javascript.mas, classes => [ 'jqueryui', 'jquery.cookie', 'CXGN.BreederSearch', 'CXGN.List', 'CXGN.BreedersToolbox.HTMLSelect', 'spin_min', 'ladda_min', 'CXGN.Dataset' ] &>
8 <div class="modal fade" id="save_wizard_dataset_dialog" name="save_wizard_dataset_dialog" tabindex="-1" role="dialog" aria-labelledby="downloadWizardPhenotypesDialog">
9 <div class="modal-dialog" role="document">
10 <div class="modal-content">
11 <div class="modal-header">
12 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
13 <h4 class="modal-title" id="saveWizardDatasetDialog">Save Dataset</h4>
15 <div class="modal-body">
16 <div class="container-fluid">
18 <div class="form-group">
19 <label class="col-sm-3 control-label">Selection Name </label>
20 <div class="col-sm-9" >
21 <input type="text" class="form-control" id="save_wizard_dataset_name" />
28 <div class="modal-footer">
30 <button type="button" class="btn btn-default" name="save_wizard_dataset_cancel_button" id="save_wizard_dataset_cancel_button" data-target="#save_wizard_dataset_cancel_button">Cancel</button>
31 <button type="button" class="btn btn-primary" name="save_dataset_submit_button" id="wizard_save_dataset_submit_button" title="Submit">Save</button>
37 <table alt="breeder search" border="0" ><tr>
41 <button class="btn btn-primary" id="wizard_save_dataset_button" data-style="expand-right" title="To save selections, you must be logged in with a filter selected">Save current selection</button>
44 <td width="30"> </td>
46 Retrieve stored selections<br />
47 <div id="dataset_manage_select" >
51 get_select_box('datasets','dataset_manage_select');
54 jQuery('#dataset_manage_select').html('(Log in to use feature)');
58 <button type="button" id="show_dataset_on_wizard_button" >Show on wizard</button>
59 <button type="button" id="show_dataset_metadata_button" >View metadata</button>
60 <button id="delete_dataset_button">Delete</button>
64 <div id="dataset_details_dialog" class="modal fade" role="dialog">
65 <div class="modal-dialog">
66 <div class="modal-content">
67 <div class="modal-header">
68 <h4>Selection Details</h4>
71 <div class="modal-body">
72 <div id="dataset_details_content">[loading...]</div>
74 <div class="modal-footer">
75 <button type="button" class="btn btn-default" id="dataset_details_dialog_close_button">Close</button>
82 jQuery(document).ready(function () {
84 jQuery('#show_dataset_metadata_button').click( function() {
85 jQuery('#dataset_details_dialog').modal('show');
86 showDatasetItems('dataset_details_content', jQuery('#dataset_manage_select').find(':selected').val());
89 jQuery('#dataset_details_dialog_close_button').click( function() {
90 jQuery('#dataset_details_dialog').modal("hide");
91 jQuery('.modal-backdrop').remove();
94 jQuery('#save_wizard_dataset_cancel_button').click( function() {
95 jQuery('#save_wizard_dataset_dialog').modal("hide");
96 jQuery('.modal-backddrop').remove();
100 jQuery('#show_dataset_on_wizard_button').attr('disabled', true);
101 jQuery('#delete_dataset_button').attr('disabled', true);
102 jQuery('#show_dataset_metadata_button').attr('disabled', true);
103 jQuery('#wizard_save_dataset_button').attr('disabled', true);
106 jQuery('#show_dataset_on_wizard_button').click(function() {
107 var d = new CXGN.Dataset();
108 var dataset_id = jQuery('#dataset_manage_select').find(':selected').val();
109 replay_dataset_info(dataset_id, 1);
112 jQuery('#delete_dataset_button').click(function() {
113 var dataset_name = jQuery('#dataset_manage_select').find(':selected').text();
114 var dataset_id = jQuery('#dataset_manage_select').find(':selected').val();
116 if (confirm('Would you really like to delete the dataset "'+dataset_name+'"? This operation cannot be undone.')) {
117 var d = new CXGN.Dataset();
118 d.deleteDataset(dataset_id);
119 get_select_box('datasets','dataset_manage_select');