Subversion Repositories SmartDukaan

Rev

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

Rev 3220 Rev 3228
Line 1... Line 1...
1
var orderTable;
1
var orderTable;
2
var cartTable;
2
var cartTable;
3
var userCommunicationTable;
3
var userCommunicationTable;
4
 
4
 
5
function loadUserPane(domId, userId) {
5
function loadUserPane(domId, userId) {
6
	$.ajax({
6
    $.ajax({
7
		 type: "GET",
7
        type : "GET",
8
		 url: "/crm/user-info?userId=" + userId,
8
        url : "/crm/user-info?userId=" + userId,
9
		 success: function(response){
9
        success : function(response) {
10
			 $('#' + domId).html(response);
10
            $('#' + domId).html(response);
11
		 }
11
        }
12
	 });
12
    });
13
}
13
}
14
 
14
 
15
function loadOrderPane(domId, userId, orderId)	{
15
function loadOrderPane(domId, userId, orderId) {
16
	$.ajax({
16
    $.ajax({
17
		 type: "GET",
17
        type : "GET",
18
		 url: "/crm/user-orders?userId=" + userId,
18
        url : "/crm/user-orders?userId=" + userId,
19
		 success: function(response){
19
        success : function(response) {
20
			 $('#' + domId).html(response);
20
            $('#' + domId).html(response);
21
			 loadOrderInfo("bottom-infopane", userId, orderId);
21
            loadOrderInfo("bottom-infopane", userId, orderId);
22
			 orderTable = $('#user-orders').dataTable({
22
            orderTable = $('#user-orders').dataTable({
23
				"aaSorting": [[1,'desc']],
23
                "aaSorting" : [ [ 1, 'desc' ] ],
24
				"iDisplayLength" : 5,
24
                "iDisplayLength" : 5,
25
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
25
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
26
			 });
26
            });
27
		 }
27
        }
28
	 });
28
    });
29
}
29
}
30
 
30
 
31
function loadCartPane(domId, userId, cartId)	{
31
function loadCartPane(domId, userId, cartId) {
32
	$.ajax({
32
    $.ajax({
33
		 type: "GET",
33
        type : "GET",
34
		 url: "/crm/user-cart?userId=" + userId + "&cartId=" + cartId,
34
        url : "/crm/user-cart?userId=" + userId + "&cartId=" + cartId,
35
		 success: function(response){
35
        success : function(response) {
36
			 $('#' + domId).html(response);
36
            $('#' + domId).html(response);
37
			 cartTable = $('#user-cart').dataTable({
37
            cartTable = $('#user-cart').dataTable({
38
				"aaSorting": [[1,'desc']],
38
                "aaSorting" : [ [ 1, 'desc' ] ],
39
				"iDisplayLength" : 10,
39
                "iDisplayLength" : 10,
40
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
40
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
41
			 });
41
            });
42
		 }
42
        }
43
	 });
43
    });
44
}
44
}
45
 
45
 
46
function loadUserCommunicationPane(domId, userId)	{
46
function loadUserCommunicationPane(domId, userId) {
47
	$.ajax({
47
    $.ajax({
48
		 type: "GET",
48
        type : "GET",
49
		 url: "/crm/user-communications?userId=" + userId,
49
        url : "/crm/user-communications?userId=" + userId,
50
		 success: function(response){
50
        success : function(response) {
51
			 $('#' + domId).html(response);
51
            $('#' + domId).html(response);
52
			 userCommunicationTable = $('#user-communications').dataTable({
52
            userCommunicationTable = $('#user-communications').dataTable({
53
				"aaSorting": [[0,'desc']],
53
                "aaSorting" : [ [ 0, 'desc' ] ],
54
				"iDisplayLength" : 5,
54
                "iDisplayLength" : 5,
55
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
55
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
56
			 });
56
            });
57
		 }
57
        }
58
	 });
58
    });
59
}
59
}
60
 
60
 
61
function loadOrderInfo(domId, userId, orderId)	{
61
function loadOrderInfo(domId, userId, orderId) {
62
	$.ajax({
62
    $.ajax({
63
		 type: "GET",
63
        type : "GET",
64
		 url: "/crm/user-order-info?userId=" + userId + "&orderId=" + orderId,
64
        url : "/crm/user-order-info?userId=" + userId + "&orderId=" + orderId,
65
		 success: function(response){
65
        success : function(response) {
66
			 $('#' + domId).html(response);
66
            $('#' + domId).html(response);
67
 
67
 
68
			 var trId = 'order-row-' + orderId;
68
            var trId = 'order-row-' + orderId;
69
			 if (orderTable != null) {
69
            if (orderTable != null) {
-
 
70
                for ( var index in orderTable.fnGetNodes()) {
70
				 $.each(orderTable.fnGetNodes(), function(i, item)	{
71
                    var item = orderTable.fnGetNodes()[index];
71
					 if ($(item).attr('id') == trId) {
72
                    if ($(item).attr('id') == trId) {
72
						 orderTable.fnDisplayRow(item);
73
                        orderTable.fnDisplayRow(item);
-
 
74
                        break;
73
					 }
75
                    }
74
				 });
76
                }
75
			 }
77
            }
76
 
78
 
77
			 $('#user-orders tr').removeClass('selected');
79
            $('#user-orders tr').removeClass('selected');
78
			 $('#order-row-' + orderId).addClass('selected');
80
            $('#order-row-' + orderId).addClass('selected');
79
		 }
81
        }
80
	 });
82
    });
81
}
83
}
82
 
84
 
83
function loadLineInfo(domId, userId, itemId)	{
85
function loadLineInfo(domId, userId, itemId) {
84
	$.ajax({
86
    $.ajax({
85
		 type: "GET",
87
        type : "GET",
86
		 url: "/crm/user-line-info?userId=" + userId + "&itemId=" + itemId,
88
        url : "/crm/user-line-info?userId=" + userId + "&itemId=" + itemId,
87
		 success: function(response){
89
        success : function(response) {
88
			 $('#' + domId).html(response);
90
            $('#' + domId).html(response);
89
			 $('#user-cart tr').removeClass('selected');
91
            $('#user-cart tr').removeClass('selected');
90
			 $('#cart-row-' + itemId).addClass('selected');
92
            $('#cart-row-' + itemId).addClass('selected');
91
		 }
93
        }
92
	 });
94
    });
93
}
95
}
94
 
96
 
95
function loadCommunicationInfo(domId, userId, commId) {
97
function loadCommunicationInfo(domId, userId, commId) {
96
	$.ajax({
98
    $.ajax({
97
		 type: "GET",
99
        type : "GET",
98
		 url: "/crm/user-communication-info?userId=" + userId + "&commId=" + commId,
100
        url : "/crm/user-communication-info?userId=" + userId + "&commId="
-
 
101
                + commId,
99
		 success: function(response){
102
        success : function(response) {
100
			 $('#' + domId).html(response);
103
            $('#' + domId).html(response);
101
			 $('#user-cart tr').removeClass('selected');
104
            $('#user-cart tr').removeClass('selected');
102
			 $('#cart-row-' + commId).addClass('selected');
105
            $('#cart-row-' + commId).addClass('selected');
103
		 }
106
        }
104
	 });
107
    });
105
}
108
}
106
 
109
 
107
function loadTicketInfo(domId, ticketId, ticketTable) {
110
function loadTicketInfo(domId, ticketId, ticketTable, activityId) {
108
	$.ajax({
111
    $.ajax({
109
		 type: "GET",
112
        type : "GET",
110
		 url: "/crm/user-tickets/" + ticketId + "/edit",
113
        url : "/crm/user-tickets/" + ticketId + "/edit",
111
		 success: function(response) {
114
        success : function(response) {
112
			 $('#' + domId).html(response);
115
            $('#' + domId).html(response);
113
 
116
 
114
			 var trId = 'ticket-row-' + ticketId;
117
            var trId = 'ticket-row-' + ticketId;
115
			 if (ticketTable != null) {
118
            if (ticketTable != null) {
-
 
119
                for ( var index in ticketTable.fnGetNodes()) {
116
				 $.each(ticketTable.fnGetNodes(), function(i, item)	{
120
                    var item = ticketTable.fnGetNodes()[index];
117
					 if ($(item).attr('id') == trId) {
121
                    if ($(item).attr('id') == trId) {
118
						 ticketTable.fnDisplayRow(item);
122
                        ticketTable.fnDisplayRow(item);
-
 
123
                        break;
119
					 }
124
                    }
120
				 });
125
                }
121
			 }
126
            }
122
 
127
 
123
			 $('#user-tickets tr').removeClass('selected');
128
            $('#user-tickets tr').removeClass('selected');
-
 
129
            $('#tickets tr').removeClass('selected');
124
			 $('#' + trId).addClass('selected');
130
            $('#' + trId).addClass('selected');
-
 
131
 
-
 
132
            // For tickets accessed from activity page
-
 
133
            if (activityId != null) {
-
 
134
                $('#user-activity tr').removeClass('selected');
-
 
135
                $('#activity-row-' + activityId).addClass('selected');
-
 
136
            }
125
		 }
137
        }
126
	 });
138
    });
127
}
139
}
128
 
140
 
129
function loadTicketPane(domId, userId, ticketId) {
141
function loadTicketPane(domId, userId, ticketId) {
130
	$.ajax({
142
    $.ajax({
131
		 type: "GET",
143
        type : "GET",
132
		 url: "/crm/user-tickets?userId=" + userId,
144
        url : "/crm/user-tickets?userId=" + userId,
133
		 success: function(response){
145
        success : function(response) {
134
			 $('#' + domId).html(response);
146
            $('#' + domId).html(response);
135
			 var ticketTable = $('#user-tickets').dataTable({
147
            var ticketTable = $('#user-tickets').dataTable({
136
				"aaSorting": [[2,'desc']],
148
                "aaSorting" : [ [ 2, 'desc' ] ],
137
				"iDisplayLength" : 5,
149
                "iDisplayLength" : 5,
138
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
150
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
139
			 });
151
            });
140
			 if (ticketId) {
152
            if (ticketId) {
141
				 loadTicketInfo("bottom-infopane", ticketId, ticketTable);
153
                loadTicketInfo("bottom-infopane", ticketId, ticketTable, null);
142
			 }
154
            }
143
		 }
155
        }
144
	 });
156
    });
145
}
157
}
146
 
158
 
147
function loadActivityInfo(domId, userId, activityId) {
159
function loadActivityInfo(domId, userId, activityId) {
148
	$.ajax({
160
    $.ajax({
149
		 type: "GET",
161
        type : "GET",
150
		 url: "/crm/user-activity-info?userId=" + userId + "&activityId=" + activityId,
162
        url : "/crm/user-activity-info?userId=" + userId + "&activityId="
-
 
163
                + activityId,
151
		 success: function(response){
164
        success : function(response) {
152
			 $('#' + domId).html(response);
165
            $('#' + domId).html(response);
153
			 $('#user-activity tr').removeClass('selected');
166
            $('#user-activity tr').removeClass('selected');
154
			 $('#activity-row-' + activityId).addClass('selected');
167
            $('#activity-row-' + activityId).addClass('selected');
155
		 }
168
        }
156
	 });
169
    });
157
}
170
}
158
 
171
 
159
function loadActivityPane(domId, userId) {
172
function loadActivityPane(domId, userId) {
160
	$.ajax({
173
    $.ajax({
161
		 type: "GET",
174
        type : "GET",
162
		 url: "/crm/user-activity?userId=" + userId,
175
        url : "/crm/user-activity?userId=" + userId,
163
		 success: function(response){
176
        success : function(response) {
164
			 $('#' + domId).html(response);
177
            $('#' + domId).html(response);
165
			 var activityTable = $('#user-activity').dataTable({
178
            var activityTable = $('#user-activity').dataTable({
166
				"aaSorting": [[4,'desc']],
179
                "aaSorting" : [ [ 4, 'desc' ] ],
167
				"iDisplayLength" : 5,
180
                "iDisplayLength" : 5,
168
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
181
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
169
			 });
182
            });
170
		 }
183
        }
171
	 });
184
    });
172
}
185
}
173
 
186
 
174
function loadTicketCreationForm(domId, userId) {
187
function loadTicketCreationForm(domId, userId) {
175
	$.ajax({
188
    $.ajax({
176
		 type: "GET",
189
        type : "GET",
177
		 url: "/crm/user-tickets/new?userId=" + userId,
190
        url : "/crm/user-tickets/new?userId=" + userId,
178
		 success: function(response){
191
        success : function(response) {
179
			 $('#' + domId).html(response);
192
            $('#' + domId).html(response);
180
		 }
193
        }
181
	 });
194
    });
182
}
195
}
183
 
196
 
184
function loadActivityCreationForm(domId, userId) {
197
function loadActivityCreationForm(domId, userId) {
185
	$.ajax({
198
    $.ajax({
186
		 type: "GET",
199
        type : "GET",
187
		 url: "/crm/user-activity/new?userId=" + userId,
200
        url : "/crm/user-activity/new?userId=" + userId,
188
		 success: function(response){
201
        success : function(response) {
189
			 $('#' + domId).html(response);
202
            $('#' + domId).html(response);
190
		 }
203
        }
191
	 });
204
    });
192
}
205
}
193
 
206
 
194
function updateTicket(domId, ticketId, params) {
207
function updateTicket(domId, ticketId, params) {
195
	$.ajax({
208
    $.ajax({
196
		 type: "PUT",
209
        type : "PUT",
197
		 url: "/crm/user-tickets/" + ticketId + "?" + params,
210
        url : "/crm/user-tickets/" + ticketId + "?" + params,
198
		 success: function(response) {
211
        success : function(response) {
199
			 $('#' + domId).html(response);
212
            $('#' + domId).html(response);
200
			 var ticketTable = $('#user-tickets').dataTable({
213
            var ticketTable = $('#user-tickets').dataTable({
201
					"aaSorting": [[2,'desc']],
214
                "aaSorting" : [ [ 2, 'desc' ] ],
202
					"iDisplayLength" : 5,
215
                "iDisplayLength" : 5,
203
					"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
216
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
204
			 });
217
            });
205
			 loadTicketInfo("bottom-infopane", ticketId, ticketTable);
218
            loadTicketInfo("bottom-infopane", ticketId, ticketTable, null);
206
		 }
219
        }
207
	 });
220
    });
208
}
221
}
209
 
222
 
210
function createTicket(domId, params) {
223
function createTicket(domId, params) {
211
	$.ajax({
224
    $.ajax({
212
		 type: "POST",
225
        type : "POST",
213
		 url: "/crm/user-tickets",
226
        url : "/crm/user-tickets",
214
		 data: params,
227
        data : params,
215
		 success: function(response){
228
        success : function(response) {
216
			 $('#' + domId).html(response);
229
            $('#' + domId).html(response);
217
			 var ticketTable = $('#user-tickets').dataTable({
230
            var ticketTable = $('#user-tickets').dataTable({
218
					"aaSorting": [[2,'desc']],
231
                "aaSorting" : [ [ 2, 'desc' ] ],
219
					"iDisplayLength" : 5,
232
                "iDisplayLength" : 5,
220
					"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
233
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
221
			 });
234
            });
222
		 }
235
        }
223
	 });
236
    });
224
}
237
}
225
 
238
 
226
function createActivity(domId, params) {
239
function createActivity(domId, params) {
227
	$.ajax({
240
    $.ajax({
228
		type: "POST",
241
        type : "POST",
229
		url: "/crm/user-activity",
242
        url : "/crm/user-activity",
230
		data: params,
243
        data : params,
231
		success: function(response){
244
        success : function(response) {
232
			$('#' + domId).html(response);
245
            $('#' + domId).html(response);
233
			var activityTable = $('#user-activity').dataTable({
246
            var activityTable = $('#user-activity').dataTable({
234
				"aaSorting": [[4,'desc']],
247
                "aaSorting" : [ [ 4, 'desc' ] ],
235
				"iDisplayLength" : 5,
248
                "iDisplayLength" : 5,
236
				"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
249
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
237
			});
250
            });
238
		}
251
        }
239
	});
252
    });
240
}
253
}
241
 
254
 
242
function goToHomePage() {
255
function goToHomePage() {
243
	document.location.href = "/crm";
256
    document.location.href = "/crm";
244
}
257
}
245
 
258
 
246
function loadMyOpenTickets(domId) {
259
function loadMyOpenTickets(domId) {
247
	$.ajax({
260
    $.ajax({
248
		 type: "GET",
261
        type : "GET",
249
		 url: "/crm/tickets!getMyOpenTickets",
262
        url : "/crm/tickets!getMyOpenTickets",
250
		 success: function(response){
263
        success : function(response) {
251
			 $('#' + domId).html(response);
264
            $('#' + domId).html(response);
252
			 var ticketTable = $('table#tickets').dataTable({
265
            var ticketTable = $('table#tickets').dataTable({
253
					"aaSorting": [[3,'desc']],
266
                "aaSorting" : [ [ 3, 'desc' ] ],
254
					"iDisplayLength" : 5,
267
                "iDisplayLength" : 5,
255
					"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
268
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
256
			 });
269
            });
257
		 }
270
        }
258
	 });
271
    });
259
}
272
}
260
 
273
 
261
function loadMyTickets(domId) {
274
function loadMyTickets(domId) {
262
	$.ajax({
275
    $.ajax({
263
		 type: "GET",
276
        type : "GET",
264
		 url: "/crm/tickets!getMyTickets",
277
        url : "/crm/tickets!getMyTickets",
265
		 success: function(response){
278
        success : function(response) {
266
			 $('#' + domId).html(response);
279
            $('#' + domId).html(response);
267
			 var ticketTable = $('table#tickets').dataTable({
280
            var ticketTable = $('table#tickets').dataTable({
268
					"aaSorting": [[3,'desc']],
281
                "aaSorting" : [ [ 3, 'desc' ] ],
269
					"iDisplayLength" : 5,
282
                "iDisplayLength" : 5,
270
					"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
283
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
271
			 });
284
            });
272
		 }
285
        }
273
	 });
286
    });
274
}
287
}
275
 
288
 
276
function loadUnassignedTickets(domId) {
289
function loadUnassignedTickets(domId) {
277
	$.ajax({
290
    $.ajax({
278
		 type: "GET",
291
        type : "GET",
279
		 url: "/crm/tickets!getUnassignedTickets",
292
        url : "/crm/tickets!getUnassignedTickets",
280
		 success: function(response){
293
        success : function(response) {
281
			 $('#' + domId).html(response);
294
            $('#' + domId).html(response);
282
			 var ticketTable = $('table#tickets').dataTable({
295
            var ticketTable = $('table#tickets').dataTable({
283
					"aaSorting": [[3,'desc']],
296
                "aaSorting" : [ [ 3, 'desc' ] ],
284
					"iDisplayLength" : 5,
297
                "iDisplayLength" : 5,
285
					"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
298
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
286
			 });
299
            });
287
		 }
300
        }
288
	 });
301
    });
289
}
302
}
290
 
303
 
291
function loadAllOpenTickets(domId) {
304
function loadAllOpenTickets(domId) {
292
	$.ajax({
305
    $.ajax({
293
		 type: "GET",
306
        type : "GET",
294
		 url: "/crm/tickets!getAllOpenTickets",
307
        url : "/crm/tickets!getAllOpenTickets",
295
		 success: function(response){
308
        success : function(response) {
296
			 $('#' + domId).html(response);
309
            $('#' + domId).html(response);
297
			 var ticketTable = $('table#tickets').dataTable({
310
            var ticketTable = $('table#tickets').dataTable({
298
					"aaSorting": [[3,'desc']],
311
                "aaSorting" : [ [ 3, 'desc' ] ],
299
					"iDisplayLength" : 5,
312
                "iDisplayLength" : 5,
300
					"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
313
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
301
			 });
314
            });
302
		 }
315
        }
303
	 });
316
    });
304
}
317
}
305
 
318
 
306
function loadAllTickets(domId) {
319
function loadAllTickets(domId) {
307
	$.ajax({
320
    $.ajax({
308
		 type: "GET",
321
        type : "GET",
309
		 url: "/crm/tickets!getAllTickets",
322
        url : "/crm/tickets!getAllTickets",
310
		 success: function(response){
323
        success : function(response) {
311
			 $('#' + domId).html(response);
324
            $('#' + domId).html(response);
312
			 var ticketTable = $('table#tickets').dataTable({
325
            var ticketTable = $('table#tickets').dataTable({
313
					"aaSorting": [[3,'desc']],
326
                "aaSorting" : [ [ 3, 'desc' ] ],
314
					"iDisplayLength" : 5,
327
                "iDisplayLength" : 5,
315
					"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
328
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
316
			 });
329
            });
317
		 }
330
        }
318
	 });
331
    });
319
}
332
}
320
 
333
 
321
function processActivityTypeChange(userId, activityType) {
334
function processActivityTypeChange(userId, activityType) {
322
	if (activityType == "EMAIL_CUSTOMER") {
335
    if (activityType == "EMAIL_CUSTOMER") {
323
		$.colorbox({
336
        $.colorbox({
324
			inline: true,
337
            inline : true,
325
			width:  "735px",
338
            width : "735px",
326
			height: "365px",
339
            height : "365px",
327
			href:   "div#mail-div",
340
            href : "div#mail-div",
328
			onClosed: function() {
341
            onClosed : function() {
329
				$("div#mail-div").hide();
342
                $("div#mail-div").hide();
330
				$('select#activity-type').val('OTHER');
343
                $('select#activity-type').val('OTHER');
331
			}
344
            }
332
		});
345
        });
333
 
346
 
334
		$("div#mail-div").show();
347
        $("div#mail-div").show();
335
	}
348
    }
336
}
349
}
337
 
350
 
338
function processInputFormSubmit() {
351
function processInputFormSubmit() {
339
	$.ajax({
352
    $.ajax({
340
		 type: "POST",
353
        type : "POST",
341
		 url: "/crm/",
354
        url : "/crm/",
342
		 success: function(response){
355
        success : function(response) {
343
			 $.html(response);
356
            $.html(response);
344
			 var ticketTable = $('table#tickets').dataTable({
357
            var ticketTable = $('table#tickets').dataTable({
345
					"aaSorting": [[3,'desc']],
358
                "aaSorting" : [ [ 3, 'desc' ] ],
346
					"iDisplayLength" : 5,
359
                "iDisplayLength" : 5,
347
					"aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
360
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
348
			 });
361
            });
349
		 }
362
        }
350
	 });	
363
    });
351
}
364
}
352
365