Subversion Repositories SmartDukaan

Rev

Rev 5917 | Rev 6153 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5917 Rev 6111
Line 37... Line 37...
37
            });
37
            });
38
        }
38
        }
39
    });
39
    });
40
}
40
}
41
 
41
 
-
 
42
function loadRechargeOrderPane(domId, userId, rechargeOrderId) {
-
 
43
    $.ajax({
-
 
44
        type : "GET",
-
 
45
        url : "/crm/recharge-orders?userId=" + userId,
-
 
46
        success : function(response) {
-
 
47
            $('#' + domId).html(response);
-
 
48
            loadRechargeOrderInfo("bottom-infopane", rechargeOrderId);
-
 
49
            orderTable = $('#recharge-orders').dataTable({
-
 
50
                "aaSorting" : [ [ 1, 'desc' ] ],
-
 
51
              "bAutoWidth": false,
-
 
52
              "aoColumns" : [{ "sWidth": "16%" },//recharge order id
-
 
53
                             { "sWidth": "30%" },//desc
-
 
54
                             { "sWidth": "16%" },//created
-
 
55
                             { "sWidth": "8%" },//amount
-
 
56
                             { "sWidth": "17%" },//status
-
 
57
                             { "sWidth": "9%" }],//mobile no.
-
 
58
                "fnDrawCallback": function() { truncateText(125); },
-
 
59
                "iDisplayLength" : 10,
-
 
60
                "sDom" : 'T<"clear">lfrtip',
-
 
61
                "oTableTools" : {
-
 
62
                    "sSwfPath" : "swf/copy_cvs_xls_pdf.swf"
-
 
63
                },
-
 
64
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
-
 
65
            });
-
 
66
        }
-
 
67
    });
-
 
68
}
-
 
69
 
-
 
70
function loadRechargeOrderInfo(domId, rechargeOrderId) {
-
 
71
    $.ajax({
-
 
72
        type : "GET",
-
 
73
        url : "/crm/recharge-order-info?rechargeOrderId=" + rechargeOrderId,
-
 
74
        success : function(response) {
-
 
75
            $('#' + domId).html(response);
-
 
76
 
-
 
77
            var trId = 'order-row-' + rechargeOrderId;
-
 
78
            if (orderTable != null) {
-
 
79
                for ( var index in orderTable.fnGetNodes()) {
-
 
80
                    var item = orderTable.fnGetNodes()[index];
-
 
81
                    if ($(item).attr('id') == trId) {
-
 
82
                        orderTable.fnDisplayRow(item);
-
 
83
                        break;
-
 
84
                    }
-
 
85
                }
-
 
86
            }
-
 
87
 
-
 
88
            $('#recharge-orders tr').removeClass('selected');
-
 
89
            $('#order-row-' + orderId).addClass('selected');
-
 
90
        }
-
 
91
    });
-
 
92
}
-
 
93
 
42
function loadCartPane(domId, userId, cartId) {
94
function loadCartPane(domId, userId, cartId) {
43
    $.ajax({
95
    $.ajax({
44
        type : "GET",
96
        type : "GET",
45
        url : "/crm/user-cart?userId=" + userId + "&cartId=" + cartId,
97
        url : "/crm/user-cart?userId=" + userId + "&cartId=" + cartId,
46
        success : function(response) {
98
        success : function(response) {