Subversion Repositories SmartDukaan

Rev

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

Rev 4027 Rev 4065
Line 431... Line 431...
431
        }
431
        }
432
    });
432
    });
433
}
433
}
434
 
434
 
435
function updateOrderStatus(domId, ticketId, orderId, orderStatus) {
435
function updateOrderStatus(domId, ticketId, orderId, orderStatus) {
-
 
436
    if (orderStatus == "CANCELED") {
-
 
437
        if (!confirm("Are you sure you want to cancel order id: " + orderId + " ?")) {
-
 
438
            return;
-
 
439
        }
-
 
440
    }
-
 
441
 
436
    $.ajax({
442
    $.ajax({
437
        type : "POST",
443
        type : "POST",
438
        url : "/crm/tickets!updateOrderStatus?id=" + ticketId + "&orderId=" + orderId + "&orderStatus=" + orderStatus,
444
        url : "/crm/tickets!updateOrderStatus?id=" + ticketId + "&orderId=" + orderId + "&orderStatus=" + orderStatus,
439
        success : function(response) {
445
        success : function(response) {
440
            $('#' + domId).html(response);
446
            $('#' + domId).html(response);
Line 450... Line 456...
450
            $('#' + domId).html(response);
456
            $('#' + domId).html(response);
451
            var activityTable = createActivityDataTable('activity');
457
            var activityTable = createActivityDataTable('activity');
452
        }
458
        }
453
    });
459
    });
454
}
460
}
-
 
461
 
-
 
462
function refreshSidebar() {
-
 
463
    $.ajax({
-
 
464
        type : "GET",
-
 
465
        url : "/crm",
-
 
466
        success : function(response) {
-
 
467
            $('#sidebar').html($(response).find('#sidebar').html());
-
 
468
        }
-
 
469
    });
-
 
470
}
455
471