Subversion Repositories SmartDukaan

Rev

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

Rev 27754 Rev 27755
Line 9... Line 9...
9
	$(document).on('click', ".pending_fofo_order", function() {
9
	$(document).on('click', ".pending_fofo_order", function() {
10
		console.log("Helloo")
10
		console.log("Helloo")
11
		loadPendingOrder("main-content");
11
		loadPendingOrder("main-content");
12
	});
12
	});
13
 
13
 
14
	$("button.pendingOrderDetail").live(
14
	$(document).on('click', "button.pendingOrderDetail",
15
			'click',
-
 
16
			function() {
15
			function() {
17
				doGetAjaxRequestHandler(context
16
				doGetAjaxRequestHandler(context
18
						+ "/getPendingOrderItem?orderId=" + $(this).data('orderid'), function(
17
						+ "/getPendingOrderItem?orderId=" + $(this).data('orderid'), function(
19
						response) {
18
						response) {
20
					$('.pending-order-container').html(response);
19
					$('.pending-order-container').html(response);
21
				});
20
				});
22
			});
21
			});
23
 
22
 
24
	$(".pendingOrderCancel")
23
	$(document).on('click', ".pendingOrderCancel",
25
			.live(
-
 
26
					'click',
-
 
27
					function() {
24
					function() {
28
 
25
 
29
						var orderId = $(this).data('orderid');
26
						var orderId = $(this).data('orderid');
30
						console.log(orderId);
27
						console.log(orderId);
31
						if (confirm("Are you sure you want to cancel the order!") == true) {
28
						if (confirm("Are you sure you want to cancel the order!") == true) {
Line 41... Line 38...
41
							return false;
38
							return false;
42
						}
39
						}
43
 
40
 
44
					});
41
					});
45
 
42
 
46
	$(".pendingOrderItemCancel")
43
	$(document).on('click', ".pendingOrderItemCancel",
47
			.live(
-
 
48
					'click',
-
 
49
					function() {
44
					function() {
50
 
45
 
51
						var orderItemId = $(this).data('orderitemid');
46
						var orderItemId = $(this).data('orderitemid');
52
						if (confirm("Are you sure you want to cancel the order item!") == true) {
47
						if (confirm("Are you sure you want to cancel the order item!") == true) {
53
							doPostAjaxRequestHandler(context
48
							doPostAjaxRequestHandler(context
Line 72... Line 67...
72
	$(document).on('click', ".insurance-policy-details", function() {
67
	$(document).on('click', ".insurance-policy-details", function() {
73
		console.log("insurance-policy-details");
68
		console.log("insurance-policy-details");
74
		insurancePolicyDetails("main-content");
69
		insurancePolicyDetails("main-content");
75
	});
70
	});
76
 
71
 
77
	$(".updatePaymentDetails")
72
	$(document).on('click', ".updatePaymentDetails",
78
			.live(
-
 
79
					'click',
-
 
80
					function() {
73
					function() {
81
						console
74
						console
82
								.log("updatePaymentDetails target Button Clicked...");
75
								.log("updatePaymentDetails target Button Clicked...");
83
						var i = 1;
76
						var i = 1;
84
						var changedTotalAmount = 0;
77
						var changedTotalAmount = 0;
Line 148... Line 141...
148
									});
141
									});
149
						}
142
						}
150
 
143
 
151
					});
144
					});
152
 
145
 
153
	$('#searchType').live(
146
	$(document).on('change', '#searchType',
154
			'change',
-
 
155
			function() {
147
			function() {
156
				var searchType = $("#searchType option:selected").val();
148
				var searchType = $("#searchType option:selected").val();
157
				var searchTypevalue = $(this).find('option:selected').text();
149
				var searchTypevalue = $(this).find('option:selected').text();
158
				;
150
				;
159
				saleSearchObj.searchType = searchType;
151
				saleSearchObj.searchType = searchType;
Line 163... Line 155...
163
						startDate, endDate);
155
						startDate, endDate);
164
 
156
 
165
				$("#sale-history-search-text").val('');
157
				$("#sale-history-search-text").val('');
166
			});
158
			});
167
 
159
 
168
	$("#sale-history-search-button")
160
	$(document).on('click', "#sale-history-search-button",
169
			.live(
-
 
170
					'click',
-
 
171
					function() {
161
					function() {
172
						var searchType = $("#searchType option:selected").val();
162
						var searchType = $("#searchType option:selected").val();
173
						console.log("searchType = " + searchType);
163
						console.log("searchType = " + searchType);
174
						$("#searchType").removeClass("border-highlight");
164
						$("#searchType").removeClass("border-highlight");
175
						saleSearchObj.searchText = $(
165
						saleSearchObj.searchText = $(
Line 183... Line 173...
183
						}
173
						}
184
						saleHistorySearchInfo(saleSearchObj.searchType,
174
						saleHistorySearchInfo(saleSearchObj.searchType,
185
								saleSearchObj.searchText,
175
								saleSearchObj.searchText,
186
								saleSearchObj.startTime, saleSearchObj.endTime);
176
								saleSearchObj.startTime, saleSearchObj.endTime);
187
					});
177
					});
188
	$("#invoice-download-button")
178
	$(document).on('click', "#invoice-download-button",
189
			.live(
-
 
190
					'click',
-
 
191
					function() {
179
					function() {
192
						var searchType = $("#searchType option:selected").val();
180
						var searchType = $("#searchType option:selected").val();
193
						console.log("searchType = " + searchType);
181
						console.log("searchType = " + searchType);
194
						$("#searchType").removeClass("border-highlight");
182
						$("#searchType").removeClass("border-highlight");
195
						saleSearchObj.searchText = $(
183
						saleSearchObj.searchText = $(
Line 209... Line 197...
209
	$(document).on('click', ".search-order", function() {
197
	$(document).on('click', ".search-order", function() {
210
		console.log("search-order clicked")
198
		console.log("search-order clicked")
211
		loadSearchOrder("main-content");
199
		loadSearchOrder("main-content");
212
	});
200
	});
213
 
201
 
214
	$("#search-order-button").live(
202
	$(document).on('click', "#search-order-button",
215
			'click',
-
 
216
			function() {
203
			function() {
217
				console.log("search-order-button clicked")
204
				console.log("search-order-button clicked")
218
				var invoiceNumber = $("#search-order-text").val();
205
				var invoiceNumber = $("#search-order-text").val();
219
				loadSearchOrderDetails(invoiceNumber,
206
				loadSearchOrderDetails(invoiceNumber,
220
						"search-order-details-container");
207
						"search-order-details-container");
221
			});
208
			});
222
 
209
 
223
	$("#sale-history-paginated .next").live(
210
	$(document).on('click', "#sale-history-paginated .next",
224
			'click',
-
 
225
			function() {
211
			function() {
226
				var params = {};
212
				var params = {};
227
				params['searchType'] = saleSearchObj.searchType;
213
				params['searchType'] = saleSearchObj.searchType;
228
				params['searchValue'] = saleSearchObj.searchText;
214
				params['searchValue'] = saleSearchObj.searchText;
229
				params['startTime'] = walletHistory.startTime;
215
				params['startTime'] = walletHistory.startTime;
Line 231... Line 217...
231
				loadPaginatedNextItems('/getPaginatedSaleHistory', params,
217
				loadPaginatedNextItems('/getPaginatedSaleHistory', params,
232
						'sale-history-paginated', 'sale-history-table',
218
						'sale-history-paginated', 'sale-history-table',
233
						'sale-details-container');
219
						'sale-details-container');
234
				$(this).blur();
220
				$(this).blur();
235
			});
221
			});
236
	$("#insurance-paginated .next").live(
222
	$(document).on('click', "#insurance-paginated .next",
237
			'click',
-
 
238
			function() {
223
			function() {
239
				loadPaginatedNextItems('/insuranceDetailsPaginated', null,
224
				loadPaginatedNextItems('/insuranceDetailsPaginated', null,
240
						'insurance-paginated', 'insurance-details-table',
225
						'insurance-paginated', 'insurance-details-table',
241
						'insurance-policy-details-container');
226
						'insurance-policy-details-container');
242
				$(this).blur();
227
				$(this).blur();
243
			});
228
			});
244
	$("#insurance-paginated .previous").live(
229
	$(document).on('click', "#insurance-paginated .previous",
245
			'click',
-
 
246
			function() {
230
			function() {
247
				loadPaginatedNextItems('/insuranceDetailsPaginated', null,
231
				loadPaginatedNextItems('/insuranceDetailsPaginated', null,
248
						'insurance-paginated', 'insurance-details-table',
232
						'insurance-paginated', 'insurance-details-table',
249
						'insurance-policy-details-container');
233
						'insurance-policy-details-container');
250
				$(this).blur();
234
				$(this).blur();
251
			});
235
			});
252
 
236
 
253
	$("#sale-history-paginated .previous").live(
237
	$(document).on('click', "#sale-history-paginated .previous",
254
			'click',
-
 
255
			function() {
238
			function() {
256
				var params = {};
239
				var params = {};
257
				params['searchType'] = saleSearchObj.searchType;
240
				params['searchType'] = saleSearchObj.searchType;
258
				params['searchValue'] = saleSearchObj.searchText;
241
				params['searchValue'] = saleSearchObj.searchText;
259
				params['startTime'] = walletHistory.startTime;
242
				params['startTime'] = walletHistory.startTime;