Subversion Repositories SmartDukaan

Rev

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

Rev 7372 Rev 7393
Line 631... Line 631...
631
 
631
 
632
        $("div#cancel-div").show();
632
        $("div#cancel-div").show();
633
        $('#cancel-body').ckeditor({toolbar : 'Basic', scayt_autoStartup : true});
633
        $('#cancel-body').ckeditor({toolbar : 'Basic', scayt_autoStartup : true});
634
}
634
}
635
 
635
 
-
 
636
function displayCancelStoreOrderPopUp() {
-
 
637
	$.colorbox({
-
 
638
        inline : true,
-
 
639
        width : "650px",
-
 
640
        height : "550px",
-
 
641
        href : "#cancel-store-order-div",
-
 
642
        onClosed : function() {
-
 
643
            CKEDITOR.instances['cancel-store-order-body'].destroy(false);
-
 
644
            $("#cancel-store-order-div").hide();
-
 
645
        }
-
 
646
    });
-
 
647
 
-
 
648
    $("#cancel-store-order-div").show();
-
 
649
    $('#cancel-store-order-body').ckeditor({toolbar : 'Basic', scayt_autoStartup : true});
-
 
650
}
-
 
651
 
636
function displayLimitedCancelOrderPopUp() {
652
function displayLimitedCancelOrderPopUp() {
637
	$.colorbox({
653
	$.colorbox({
638
        inline : true,
654
        inline : true,
639
        width : "650px",
655
        width : "650px",
640
        height : "550px",
656
        height : "550px",
Line 683... Line 699...
683
    	});
699
    	});
684
    	
700
    	
685
    }
701
    }
686
}
702
}
687
 
703
 
-
 
704
function cancelStoreOrder(domId, ticketId, orderId, orderStatus, formData) {
-
 
705
	if ($('#cancellationInitiator').val() != "CUSTOMER" && $('#cancellationInitiator').val() != "INTERNAL") {
-
 
706
		alert("Cannot refund");
-
 
707
		return false;
-
 
708
	} 
-
 
709
	var cancellationInitiator = $('#cancellationInitiator').val();
-
 
710
	var uri = "/crm/user-order-info!markOrderForCancellation?orderId=" + orderId
-
 
711
					+ "&cancellationInitiator=" + cancellationInitiator + "&" + formData;
-
 
712
	var cancellationResult = function() {
-
 
713
		document.location.href = "/crm?email=&orderId=" + orderId;
-
 
714
	}
-
 
715
	
-
 
716
    $.ajax({
-
 
717
        type : "POST",
-
 
718
        url : uri,
-
 
719
        success : cancellationResult
-
 
720
    });
-
 
721
}
-
 
722
 
688
function updateOrderStatus(domId, ticketId, orderId, orderStatus) {
723
function updateOrderStatus(domId, ticketId, orderId, orderStatus) {
689
    $.ajax({
724
    $.ajax({
690
        type : "POST",
725
        type : "POST",
691
        url : "/crm/tickets!updateOrderStatus?id=" + ticketId + "&orderId=" + orderId
726
        url : "/crm/tickets!updateOrderStatus?id=" + ticketId + "&orderId=" + orderId
692
        					+ "&orderStatus=" + orderStatus,
727
        					+ "&orderStatus=" + orderStatus,