Subversion Repositories SmartDukaan

Rev

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

Rev 25587 Rev 25645
Line 58... Line 58...
58
							'refferal-container');
58
							'refferal-container');
59
				}
59
				}
60
				$(this).blur();
60
				$(this).blur();
61
			});
61
			});
62
 
62
 
-
 
63
	var rejectionrefferalId = null;
-
 
64
 
-
 
65
	$(".refferal-reject-modal").live('click', function() {
-
 
66
 
-
 
67
		rejectionrefferalId = $(this).data('requestid');
-
 
68
		$('#add-rejection-reason').modal('show');
-
 
69
 
-
 
70
	});
-
 
71
 
63
	$(".refferal-reject")
72
	$(".refferal-reject")
64
			.live(
73
			.live(
65
					'click',
74
					'click',
66
					function() {
75
					function() {
-
 
76
						rejectionReason = $('#rejectionReason').val();
-
 
77
 
-
 
78
						if (rejectionReason === "") {
-
 
79
							alert("Reason is required");
-
 
80
							return false;
-
 
81
						}
-
 
82
 
-
 
83
						console.log(rejectionrefferalId);
-
 
84
						console.log(rejectionReason);
67
						if (confirm("Are you sure you want to Reject the refferal") == true) {
85
						if (confirm("Are you sure you want to Reject the refferal") == true) {
68
 
86
 
69
							refferalId = $(this).data('requestid');
-
 
70
							console.log(refferalId);
-
 
71
							doPutAjaxRequestHandler(context
87
							doPutAjaxRequestHandler(context
72
									+ "/rejectRefferal?refferalId="
88
									+ "/rejectRefferal?refferalId="
-
 
89
									+ rejectionrefferalId + "&rejectionReason="
73
									+ refferalId, function(response) {
90
									+ rejectionReason, function(response) {
74
								if (response == 'true') {
91
								if (response == 'true') {
75
									alert("successfully Rejected");
92
									alert("successfully Rejected");
-
 
93
									$('#add-rejection-reason').modal('hide');
-
 
94
									$('.modal-backdrop').remove();
76
									loadRefferals("main-content");
95
									loadRefferals("main-content");
77
								}
96
								}
78
 
97
 
79
							});
98
							});
80
						}
99
						}