Changeset 725 for pro-violet-viettel/sourcecode/assets/js/admin
- Timestamp:
- Jan 30, 2015 6:48:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/assets/js/admin/user.js
r690 r725 55 55 { 56 56 $.ajax({ 57 url: '/frontend/user/ trade_history/'+id +'/page/'+page,57 url: '/frontend/user/getUserInfor/'+id +'/page/'+page, 58 58 type: 'POST', 59 59 success: function(data) 60 60 { 61 61 62 results = jQuery.parseJSON(data); 62 paging = results.paging; 63 result = results.paidlogs; 64 content = ""; 65 if(result.length>0){ 66 for (var i in result) 67 { 68 source = result[i].source; 69 if (result[i].source == null || result[i].source == '') source = 'Thẻ cà o'; 70 content += '<tr><td class="center">'+source+'</td><td class="center">'+result[i].amount+'</td><td>'+result[i].paid_time+'</td></tr>'; 71 } 72 }else 73 { 74 content += '<tr><td class="center" colspan=3>Chưa có giao dá»ch nà o!</td></tr>'; 75 } 76 $("#user-history").find("#content-trade-histoty").html(content); 77 $("#user-history").find("#trade-pagination").html(paging); 78 $("#trade-pagination .ajax_paging").click(function () 79 { 80 $.ajax({ 81 url: $(this).attr("href"), 82 type: "POST", 83 success: function (data, textStatus, jqXHR) 84 { 85 results = jQuery.parseJSON(data); 86 tradeHistory(id, results.current_page); 87 }, 88 error: function () 89 { 90 $(".ajaxloading").hide(); 91 } 92 }); 93 return false; 94 }); 95 63 64 $("#content-trade-histoty").html(results.modal); 65 96 66 } 97 67 }); 98 68 } 69 99 70 100 71 function getUserHistory(id, page) … … 104 75 $("#user-history").modal('show'); 105 76 } 77 78 function admin_update_user() 79 { 80 81 $.ajax({ 82 url: '/frontend/user/adminUpdateUser/', 83 type: 'POST', 84 data: $("#admin_update_user_form").serialize(), 85 success: function(data) 86 { 87 88 results = jQuery.parseJSON(data); 89 90 if(results.success==1) 91 { 92 $('#user-history').modal('hide'); 93 alert("Äã cáºp nháºt"); 94 95 } 96 97 } 98 }); 99 }
Note: See TracChangeset
for help on using the changeset viewer.