1jQuery(document).ready(function($){ 2 3 /* ship ho */ 4 $("#add_shiporder_item").click(function(){ 5 var number_ship = $("#row_add_shiporder_item #number_ship").val(); 6 var shiporder_shipid = $("#row_add_shiporder_item #shiporder_shipid").val(); 7 var shiporder_rec_name = $("#row_add_shiporder_item #shiporder_rec_name").val(); 8 var shiporder_desc = $("#row_add_shiporder_item #shiporder_desc").val(); 9 var file_image = $("#file_upload").val(); 10 //var is_wood_pack = $('#row_add_shiporder_item #is_wood_pack').is(':checked') ? 1 : 0; 11 var shiporder_commodity = $("#row_add_shiporder_item #shiporder_commodity").val(); 12 var address_in_china = $("#row_add_shiporder_item #shiporder_address_in_china").val(); 13 var value_rmb = $('#row_add_shiporder_item #buy_insurance').is(':checked') ? $('#row_add_shiporder_item #value_rmb').val() : ''; 14 var URL=baseURL+"ShipOrder/addItem"; 15 var cart_id = 0; 16 17 if (!shiporder_shipid.trim() || !shiporder_rec_name.trim()) { 18 alert('Bạn chưa nháºp Äá»§ thông tin bắt buá»c (*)'); 19 }else{ 20 21 var data={ 22 "shipid":shiporder_shipid, 23 "rec_name":shiporder_rec_name, 24 "desc":shiporder_desc, 25 "file_image":file_image, 26 //'is_wood_pack': is_wood_pack, 27 'commodity' : shiporder_commodity, 28 'address_in_china' : address_in_china, 29 'file_image': file_image, 30 'value_rmb': value_rmb 31 }; 32 $.ajax({ 33 url: URL, 34 type: "post", 35 data: data, 36 success: function (response) { 37 // you will get response from your php page (what you echo or print) 38 var obj = $.parseJSON(response); 39 if(obj.Response == 'Error'){ 40 alert(obj.Error); 41 }else{ 42 cart_id = obj.cart_id; 43 $("#btn_cart_submit").remove(); 44 var file_image_text=$("#uploaded_prev").html(); 45 $("#myformID")[0].reset(); 46 $("#file_upload").val(""); 47 $( "#uploaded_prev").empty(); 48 $('#row_add_shiporder_item #shiporder_commodity').val('').trigger('chosen:updated'); 49 50 var tr_html='<tr>'; 51 tr_html +='<td class="center">'; 52 tr_html +='<input type="checkbox" value="'+shiporder_shipid+'" name="checkbox[]">'; 53 tr_html +='</td>'; 54 tr_html +='<td>'; 55 tr_html +=number_ship; 56 tr_html +='</td>'; 57 tr_html +='<td>'; 58 tr_html +=shiporder_shipid; 59 tr_html +='</td>'; 60 tr_html +='<td>'; 61 tr_html +=shiporder_rec_name; 62 tr_html +='</td>'; 63 tr_html +='<td>'; 64 tr_html += '<p><span class="black">Danh mục: </span>'+shiporder_commodity+'</p><p><span class="black">Ghi chú: </span>'+shiporder_desc+'</p>'; 65 if(value_rmb > 0){ 66 tr_html += '<p><span class="black">Mua bảo hiá»m ('+value_rmb+') </span></p>'; 67 tr_html +='</td>'; 68 } 69 if(file_image_text != ""){ 70 tr_html += '<p><span class="black">Ảnh ÄÃnh kèm: </span>'+file_image_text+'</p>'; 71 } 72 tr_html +='</td>'; 73 tr_html +='<td>'; 74 tr_html +='<a class="red delete_this_item" cart-id="'+cart_id+'">Xóa</a>'; 75 tr_html +='</td>'; 76 tr_html +='</tr>'; 77 tr_html +='<tr id="btn_cart_submit"><td class="center" ><input type="submit" name="confirm_order" id="confirm_order" class="btn btn-warning right" value="Gá»i ÄÆ¡n hà ng"></td></tr>'; 78 $("#shiporderTable tbody").append(tr_html); 79 $("#row_add_shiporder_item #number_ship").val(parseInt(number_ship)+1); 80 } 81 }, 82 error: function(jqXHR, textStatus, errorThrown) { 83 console.log(textStatus, errorThrown); 84 } 85 }); 86 87 88 89 } 90 return false; 91 }); 92 93 94 /* end ship ho */ 95 /* 96 $("#fileuploader").uploadFile({ 97 url:document.location.origin + "/upload", 98 fileName:"myfile", 99 dragdropWidth:"200", 100 multiple: false, 101 acceptFiles:"image/*", 102 onSuccess:function(files,data,xhr,pd) 103 { 104 var objdata=$.parseJSON(data); 105 console.log(objdata); 106 var html =objdata; 107 var currentVal=$("#file_upload_input").val(); 108 if(currentVal) 109 currentVal +="|"+objdata.fileName; 110 else 111 currentVal = objdata.fileName; 112 $("#file_upload_input").val(currentVal); 113 var image_html='<img src="'+objdata.fileURL+'" />'; 114 $("#file_upload").append(image_html); 115 116 } 117 }); 118 */ 119});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.