7 <& /util/import_javascript.mas, classes => [ 'jquery.iframe-post-form', 'jquery', 'jquery.dataTables', 'CXGN.List'] &>
8 <& /util/import_css.mas, paths => ['/documents/inc/datatables/jquery.dataTables.css'] &>
10 <div class="modal fade" id="download_item_file_dialog" name="download_item_file_dialog" tabindex="-1" role="dialog" aria-labelledby="downloadItemFileDialog">
11 <div class="modal-dialog modal-xl" role="document">
12 <div class="modal-content">
13 <div class="modal-header">
14 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
15 <h4 class="modal-title" id="downloadItemFileDialog">Create Ordering Item File</h4>
17 <div class="modal-body">
18 <div class="container-fluid">
19 <div id="item_tracking_ids_div"></div>
22 <div class="modal-footer">
23 <a href="/ajax/order/download_order_item_file?order_id=<% $order_id %>" class="btn btn-default">Download</a>
24 <button id="close_create_item_file_dialog" type="button" class="btn btn-default" data-dismiss="modal">Close</button>
33 border: 1px solid black;
34 border-collapse: collapse;
38 border: 1px solid black;
39 border-collapse: collapse;
43 border: 1px solid black;
44 border-collapse: collapse;
51 jQuery(document).ready( function() {
53 var order_id = "<% $order_id %>";
55 jQuery("#download_active_item_file_button").click( function() {
57 url:'/ajax/order/active_order_tracking_ids',
59 success: function(response){
60 console.log(response);
62 html += '<div class="well well-sm"><table class="table table_1 table-hover table-condensed">';
63 html += '<thead><tr><th>order_tracking_name</th><th>order_tracking_id</th><th>item_name</th><th>order_number</th><th>item_number</th><th>required_quantity</th><th>required_stage</th></tr></thead><tbody>';
65 for(var i=0; i<response.tracking_info.length; i++){
66 html += '<tr><td>'+response.tracking_info[i][0]+'</td>';
67 html += '<td>'+response.tracking_info[i][1]+'</td>';
68 html += '<td>'+response.tracking_info[i][2]+'</td>';
69 html += '<td>'+response.tracking_info[i][3]+'</td>';
70 html += '<td>'+response.tracking_info[i][4]+'</td>';
71 html += '<td>'+response.tracking_info[i][5]+'</td>';
72 html += '<td>'+response.tracking_info[i][6]+'</td></tr>';
74 html = html + '</tbody></table></div>';
76 jQuery('#item_tracking_ids_div').html(html);
77 jQuery('#download_item_file_dialog').modal('show');
83 jQuery("#download_item_file_button").click( function() {
85 url:'/ajax/order/order_tracking_ids',
86 data: {'order_id': order_id },
87 success: function(response){
88 console.log(response);
90 html += '<div class="well well-sm"><table class="table table_1 table-hover table-condensed">';
91 html += '<thead><tr><th>order_tracking_name</th><th>order_tracking_id</th><th>item_name</th><th>order_number</th><th>item_number</th><th>required_quantity</th><th>required_stage</th></tr></thead><tbody>';
93 for(var i=0; i<response.tracking_info.length; i++){
94 html += '<tr><td>'+response.tracking_info[i][0]+'</td>';
95 html += '<td>'+response.tracking_info[i][1]+'</td>';
96 html += '<td>'+response.tracking_info[i][2]+'</td>';
97 html += '<td>'+response.tracking_info[i][3]+'</td>';
98 html += '<td>'+response.tracking_info[i][4]+'</td>';
99 html += '<td>'+response.tracking_info[i][5]+'</td>';
100 html += '<td>'+response.tracking_info[i][6]+'</td></tr>';
102 html = html + '</tbody></table></div>';
104 jQuery('#item_tracking_ids_div').html(html);
105 jQuery('#download_item_file_dialog').modal('show');