Ignore:
Timestamp:
Jan 30, 2015 6:48:43 PM (10 years ago)
Author:
quyenla
Message:

nguoi dung

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/assets/js/admin/user.js

    r690 r725  
    5555{
    5656        $.ajax({
    57                 url: '/frontend/user/trade_history/'+id +'/page/'+page,
     57                url: '/frontend/user/getUserInfor/'+id +'/page/'+page,
    5858                type: 'POST',
    5959                success: function(data)
    6060                {
     61                   
    6162                        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
    9666                }
    9767        });     
    9868}
     69
    9970
    10071function getUserHistory(id, page)
     
    10475        $("#user-history").modal('show');
    10576}
     77
     78function 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.