Subversion Repositories SmartDukaan

Rev

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

Rev 20179 Rev 20199
Line 1... Line 1...
1
var orderTable;
1
var orderTable;
2
var cartTable;
2
var cartTable;
-
 
3
var RETURN = RETURN || {}
3
 
4
 
4
function loadUserPane(domId, userId) {
5
function loadUserPane(domId, userId) {
5
    $.ajax({
6
    $.ajax({
6
        type : "GET",
7
        type : "GET",
7
        url : "/crm/user-info?userId=" + userId,
8
        url : "/crm/user-info?userId=" + userId,
Line 1257... Line 1258...
1257
    $.ajax({
1258
    $.ajax({
1258
        type : "GET",
1259
        type : "GET",
1259
        url : "/crm/return-transactions!view?userId=" + userId + "&returnType="+returnType,
1260
        url : "/crm/return-transactions!view?userId=" + userId + "&returnType="+returnType,
1260
        success : function(response) {
1261
        success : function(response) {
1261
            $('#' + domId).html(response);
1262
            $('#' + domId).html(response);
1262
            orderTable = $('#user-orders').dataTable({
1263
            RETURN.orderTable = $('#user-orders').dataTable({
1263
                "aaSorting" : [ [ 1, 'desc' ] ],
1264
                "aaSorting" : [ [ 1, 'desc' ] ],
1264
                "bAutoWidth": false,
1265
                "bAutoWidth": false,
1265
                "fnDrawCallback": function() { truncateText(125); },
1266
                "fnDrawCallback": function() { truncateText(125); },
1266
                "iDisplayLength" : 10,
1267
                "iDisplayLength" : 10,
1267
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
1268
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
Line 1271... Line 1272...
1271
}
1272
}
1272
 
1273
 
1273
function storeTblValues()
1274
function storeTblValues()
1274
{
1275
{
1275
    var tableData = new Array();
1276
    var tableData = new Array();
1276
 
-
 
-
 
1277
	var counter=-1;
1277
    $('#user-orders tr').each(function(row, tr){
1278
    $(RETURN.orderTable).find('tr').each(function(row, tr){
1278
    	if($(tr).find('td:eq(3)').find('input').val()!='0'){
1279
    	if($(tr).find('td:eq(3)').find('input').val()!='0'){
-
 
1280
    	counter++;
1279
    	tableData[row]={
1281
    	tableData[counter]={
1280
            "orderId" : $(tr).find('td:eq(0)').text()
1282
            "orderId" : $(tr).find('td:eq(0)').text()
1281
            , "returnQty" :$(tr).find('td:eq(3)').find('input').val()
1283
            , "returnQty" :$(tr).find('td:eq(3)').find('input').val()
1282
            , "action" : $(tr).find('td:eq(4)').find('select').val()
1284
            , "action" : $(tr).find('td:eq(4)').find('select').val()
1283
            , "returnPickupType" : $(tr).find('td:eq(5)').find('select').val()
1285
            , "returnPickupType" : $(tr).find('td:eq(5)').find('select').val()
1284
        }   
1286
        }