Subversion Repositories SmartDukaan

Rev

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

Rev 2714 Rev 2749
Line -... Line 1...
-
 
1
var orderTable;
-
 
2
var cartTable;
1
function loadUserPane(domId, userId)	{
3
function loadUserPane(domId, userId)	{
2
	$.ajax({
4
	$.ajax({
3
		 type: "GET",
5
		 type: "GET",
4
		 url: "/crm/user-info?userId=" + userId,
6
		 url: "/crm/user-info?userId=" + userId,
5
		 success: function(response){
7
		 success: function(response){
Line 13... Line 15...
13
		 type: "GET",
15
		 type: "GET",
14
		 url: "/crm/user-orders?userId=" + userId,
16
		 url: "/crm/user-orders?userId=" + userId,
15
		 success: function(response){
17
		 success: function(response){
16
			 $('#' + domId).html(response);
18
			 $('#' + domId).html(response);
17
			 loadOrderInfo("bottom-infopane", userId, orderId);
19
			 loadOrderInfo("bottom-infopane", userId, orderId);
18
			 var table = $('#user-orders').dataTable({
20
			 orderTable = $('#user-orders').dataTable({
19
				"aaSorting": [[1,'desc']],
21
				"aaSorting": [[1,'desc']],
20
				"iDisplayLength" : 5,
22
				"iDisplayLength" : 5,
21
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
23
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
22
			 });
24
			 });
23
		 }
25
		 }
Line 28... Line 30...
28
	$.ajax({
30
	$.ajax({
29
		 type: "GET",
31
		 type: "GET",
30
		 url: "/crm/user-cart?userId=" + userId + "&cartId=" + cartId,
32
		 url: "/crm/user-cart?userId=" + userId + "&cartId=" + cartId,
31
		 success: function(response){
33
		 success: function(response){
32
			 $('#' + domId).html(response);
34
			 $('#' + domId).html(response);
33
			 var table = $('#user-cart').dataTable({
35
			 cartTable = $('#user-cart').dataTable({
34
				"aaSorting": [[1,'desc']],
36
				"aaSorting": [[1,'desc']],
35
				"iDisplayLength" : 10,
37
				"iDisplayLength" : 10,
36
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
38
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
37
			 });
39
			 });
38
		 }
40
		 }