Subversion Repositories SmartDukaan

Rev

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

Rev 18888 Rev 19072
Line 716... Line 716...
716
    		alert("Unable to reset password.");
716
    		alert("Unable to reset password.");
717
    	}
717
    	}
718
    });
718
    });
719
}
719
}
720
 
720
 
721
function displayCancelOrderPopUp() {
721
function displayCancelOrderPopUp(type) {
722
    	$.colorbox({
722
    	$.colorbox({
723
            inline : true,
723
            inline : true,
724
            width : "650px",
724
            width : "650px",
725
            height : "550px",
725
            height : "550px",
726
            href : "div#cancel-div",
726
            href : "div#cancel-div",
727
            onClosed : function() {
727
            onClosed : function() {
728
                CKEDITOR.instances['cancel-body'].destroy(false);
728
                CKEDITOR.instances['cancel-body'].destroy(false);
-
 
729
                $("div#cancel-div").attr('cancelType','');
729
                $("div#cancel-div").hide();
730
                $("div#cancel-div").hide();
730
            }
731
            }
731
        });
732
        });
732
 
-
 
-
 
733
    	$("div#cancel-div").attr('cancelType',type);
733
        $("div#cancel-div").show();
734
        $("div#cancel-div").show();
734
        $('#cancel-body').ckeditor({toolbar : 'Basic', scayt_autoStartup : true});
735
        $('#cancel-body').ckeditor({toolbar : 'Basic', scayt_autoStartup : true});
735
}
736
}
736
 
737
 
737
function displayCancelStoreOrderPopUp() {
738
function displayCancelStoreOrderPopUp() {
Line 1184... Line 1185...
1184
	        "oTableTools" : {
1185
	        "oTableTools" : {
1185
	            "sSwfPath" : "swf/copy_cvs_xls_pdf.swf"
1186
	            "sSwfPath" : "swf/copy_cvs_xls_pdf.swf"
1186
	        },
1187
	        },
1187
	        "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
1188
	        "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
1188
	    });
1189
	    });
-
 
1190
}
-
 
1191
 
-
 
1192
/*function loadReturnTxnsInfo(domId){
-
 
1193
	$.ajax({
-
 
1194
		type    : "GET",
-
 
1195
		url	    : "/crm/return-transaction",
-
 
1196
		success : function(response) {
-
 
1197
			$('#' + domId).html(response);
-
 
1198
		}
-
 
1199
	});
-
 
1200
}*/
-
 
1201
 
-
 
1202
function updateTxnStatus(domId, ticketId, transactionId, orderStatus) {
-
 
1203
	$.ajax({
-
 
1204
        type : "POST",
-
 
1205
        url : "/crm/tickets!updateTxnStatus?id=" + ticketId + "&transactionId=" + transactionId
-
 
1206
        					+ "&orderStatus=" + orderStatus,
-
 
1207
        success : function(response) {
-
 
1208
            $('#' + domId).html(response);
-
 
1209
        }
-
 
1210
    });
-
 
1211
}
-
 
1212
 
-
 
1213
function cancelTxn(domId, ticketId, transactionId, orderStatus, formData) {
-
 
1214
 
-
 
1215
	var uri = "/crm/tickets!updateTxnStatus?id=" + ticketId + "&transactionId=" + transactionId
-
 
1216
					+ "&orderStatus=" + orderStatus + "&" + formData;
-
 
1217
	var cancellationResult = function(response) {
-
 
1218
        $('#' + domId).html(response);
-
 
1219
    }
-
 
1220
	
-
 
1221
    $.ajax({
-
 
1222
        type : "POST",
-
 
1223
        url : uri,
-
 
1224
        success : cancellationResult
-
 
1225
    });
1189
}
1226
}
1190
1227