Subversion Repositories SmartDukaan

Rev

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

Rev 27754 Rev 27755
Line 17... Line 17...
17
 
17
 
18
	$(document).on('click', ".refferal-transferred", function() {
18
	$(document).on('click', ".refferal-transferred", function() {
19
		loadTransferredRefferals("main-content");
19
		loadTransferredRefferals("main-content");
20
	});
20
	});
21
 
21
 
22
	$("#refferal-paginated .next").live(
22
	$(document).on('click', "#refferal-paginated .next",
23
		'click',
-
 
24
		function() {
23
		function() {
25
			var url = $('#url').val();
24
			var url = $('#url').val();
26
			console.log(url);
25
			console.log(url);
27
			if (url == "/getPaginatedRefferalsRequest") {
26
			if (url == "/getPaginatedRefferalsRequest") {
28
				loadPaginatedNextItems('/getPaginatedRefferalsRequest',
27
				loadPaginatedNextItems('/getPaginatedRefferalsRequest',
Line 38... Line 37...
38
					'refferal-container');
37
					'refferal-container');
39
			}
38
			}
40
			$(this).blur();
39
			$(this).blur();
41
		});
40
		});
42
 
41
 
43
	$("#refferal-paginated .previous").live(
42
	$(document).on('click', "#refferal-paginated .previous",
44
		'click',
-
 
45
		function() {
43
		function() {
46
			var url = $('#url').val();
44
			var url = $('#url').val();
47
			if (url == "/getPaginatedRefferalsRequest") {
45
			if (url == "/getPaginatedRefferalsRequest") {
48
				loadPaginatedPreviousItems('/getPaginatedRefferalsRequest',
46
				loadPaginatedPreviousItems('/getPaginatedRefferalsRequest',
49
					null, 'refferal-paginated', 'refferal-table',
47
					null, 'refferal-paginated', 'refferal-table',
Line 67... Line 65...
67
		rejectionrefferalId = $(this).data('requestid');
65
		rejectionrefferalId = $(this).data('requestid');
68
		$('#add-rejection-reason').modal('show');
66
		$('#add-rejection-reason').modal('show');
69
 
67
 
70
	});
68
	});
71
 
69
 
72
	$(".refferal-reject")
70
	$(document).on('click', ".refferal-reject",
73
		.live(
-
 
74
			'click',
-
 
75
			function() {
71
			function() {
76
				rejectionReason = $('#rejectionReason').val();
72
				rejectionReason = $('#rejectionReason').val();
77
 
73
 
78
				if (rejectionReason === "") {
74
				if (rejectionReason === "") {
79
					alert("Reason is required");
75
					alert("Reason is required");
Line 97... Line 93...
97
 
93
 
98
						});
94
						});
99
				}
95
				}
100
			});
96
			});
101
 
97
 
102
	$(".reffral-validate")
98
	$(document).on('click', ".reffral-validate",
103
		.live(
-
 
104
			'click',
-
 
105
			function() {
99
			function() {
106
				if (confirm("Are you sure you want to Validate the refferal") == true) {
100
				if (confirm("Are you sure you want to Validate the refferal") == true) {
107
 
101
 
108
					refferalId = $(this).data('requestid');
102
					refferalId = $(this).data('requestid');
109
					console.log(refferalId);
103
					console.log(refferalId);
Line 117... Line 111...
117
 
111
 
118
						});
112
						});
119
				}
113
				}
120
			});
114
			});
121
 
115
 
122
	$(".reffral-approve")
116
	$(document).on('click', ".reffral-approve",
123
		.live(
-
 
124
			'click',
-
 
125
			function() {
117
			function() {
126
				if (confirm("Are you sure you want to approve the refferal") == true) {
118
				if (confirm("Are you sure you want to approve the refferal") == true) {
127
 
119
 
128
					refferalId = $(this).data('requestid');
120
					refferalId = $(this).data('requestid');
129
					console.log(refferalId);
121
					console.log(refferalId);
Line 138... Line 130...
138
						});
130
						});
139
				}
131
				}
140
			});
132
			});
141
 
133
 
142
	/*
134
	/*
143
	 * $(".refferalAmountSubmit").live( 'click', function() {
135
	 * $(document).on('click', ".refferalAmountSubmit", function() {
144
	 * 
136
	 * 
145
	 * var count = $('#count').val(); var refereeEmail =
137
	 * var count = $('#count').val(); var refereeEmail =
146
	 * $('#refereeEmail').val(); var refferalAmount =
138
	 * $('#refereeEmail').val(); var refferalAmount =
147
	 * $('#refferalAmount').val(); var month = $('#previousMonth').val();
139
	 * $('#refferalAmount').val(); var month = $('#previousMonth').val();
148
	 * $('#count').attr('readonly', true); $('#refereeEmail').attr('readonly',
140
	 * $('#count').attr('readonly', true); $('#refereeEmail').attr('readonly',
Line 159... Line 151...
159
	 * 
151
	 * 
160
	 * return false; }); }
152
	 * return false; }); }
161
	 * 
153
	 * 
162
	 * });
154
	 * });
163
	 * 
155
	 * 
164
	 * $(".oldRefferalAmountSubmit").live( 'click', function() { var count =
156
	 * $(document).on('click', ".oldRefferalAmountSubmit", function() { var count =
165
	 * $('#oldMonthCount').val(); var refereeEmail = $('#refereeEmail').val();
157
	 * $('#oldMonthCount').val(); var refereeEmail = $('#refereeEmail').val();
166
	 * console.log(refereeEmail); var refferalAmount =
158
	 * console.log(refereeEmail); var refferalAmount =
167
	 * $('#oldMonthrefferalAmount').val(); var month = $('#oldMonth').val();
159
	 * $('#oldMonthrefferalAmount').val(); var month = $('#oldMonth').val();
168
	 * $('#oldMonthCount').attr('readonly', true);
160
	 * $('#oldMonthCount').attr('readonly', true);
169
	 * $('#refereeEmail').attr('readonly', true);
161
	 * $('#refereeEmail').attr('readonly', true);