Subversion Repositories SmartDukaan

Rev

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

Rev 26647 Rev 26721
Line 16... Line 16...
16
			function() {
16
			function() {
17
				var orderId = $(this).data('orderid');
17
				var orderId = $(this).data('orderid');
18
				console.log(orderId);
18
				console.log(orderId);
19
 
19
 
20
				var customerObj = {};
20
				var customerObj = {};
21
 
-
 
-
 
21
				var pendingOrder = {};
-
 
22
				pendingOrder['pendingOrderId'] = orderId;
-
 
23
				localStorage.setItem("pendingOrderId", JSON
-
 
24
						.stringify(pendingOrder));
22
				var currentRow = $(this).closest("tr");
25
				var currentRow = $(this).closest("tr");
23
				customerObj['firstName'] = currentRow.find("td:eq(1)").text();
26
				customerObj['firstName'] = currentRow.find("td:eq(1)").text();
24
				customerObj['lastName'] = currentRow.find("td:eq(2)").text();
27
				customerObj['lastName'] = currentRow.find("td:eq(2)").text();
25
				customerObj['mobileNumber'] = currentRow.find("td:eq(3)")
28
				customerObj['mobileNumber'] = currentRow.find("td:eq(3)")
26
						.text();
29
						.text();
Line 48... Line 51...
48
						response) {
51
						response) {
49
					$('.pending-order-container').html(response);
52
					$('.pending-order-container').html(response);
50
				});
53
				});
51
			});
54
			});
52
 
55
 
-
 
56
	$(".pendingOrderCancel")
-
 
57
			.live(
-
 
58
					'click',
-
 
59
					function() {
-
 
60
 
-
 
61
						var orderId = $(this).data('orderid');
-
 
62
						console.log(orderId);
-
 
63
						if (confirm("Are you sure you want to cancel the order!") == true) {
-
 
64
							doPostAjaxRequestHandler(context
-
 
65
									+ "/cancelPendingOrder?id=" + orderId,
-
 
66
									function(response) {
-
 
67
										if (response == 'true') {
-
 
68
											alert("successfully Cancel");
-
 
69
											loadPendingOrder("main-content");
-
 
70
										}
-
 
71
									});
-
 
72
 
-
 
73
							return false;
-
 
74
						}
-
 
75
 
-
 
76
					});
-
 
77
 
-
 
78
	$(".pendingOrderItemCancel")
-
 
79
			.live(
-
 
80
					'click',
-
 
81
					function() {
-
 
82
 
-
 
83
						var orderItemId = $(this).data('orderitemid');
-
 
84
						if (confirm("Are you sure you want to cancel the order item!") == true) {
-
 
85
							doPostAjaxRequestHandler(context
-
 
86
									+ "/cancelPendingOrderItem?id="
-
 
87
									+ orderItemId, function(response) {
-
 
88
								if (response == 'true') {
-
 
89
									alert("successfully Cancel");
-
 
90
									loadPendingOrder("main-content");
-
 
91
								}
-
 
92
							});
-
 
93
 
-
 
94
							return false;
-
 
95
						}
-
 
96
 
-
 
97
					});
-
 
98
 
53
	$(".sale-history").live('click', function() {
99
	$(".sale-history").live('click', function() {
54
		console.log("Sale History Button Clicked...")
100
		console.log("Sale History Button Clicked...")
55
		saleHistory("main-content", "", "", startDate, endDate);
101
		saleHistory("main-content", "", "", startDate, endDate);
56
	});
102
	});
57
 
103