Subversion Repositories SmartDukaan

Rev

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

Rev 3228 Rev 3234
Line 20... Line 20...
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
                "sDom": 'T<"clear">lfrtip',
-
 
26
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},
25
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
27
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
26
            });
28
            });
27
        }
29
        }
28
    });
30
    });
29
}
31
}
Line 35... Line 37...
35
        success : function(response) {
37
        success : function(response) {
36
            $('#' + domId).html(response);
38
            $('#' + domId).html(response);
37
            cartTable = $('#user-cart').dataTable({
39
            cartTable = $('#user-cart').dataTable({
38
                "aaSorting" : [ [ 1, 'desc' ] ],
40
                "aaSorting" : [ [ 1, 'desc' ] ],
39
                "iDisplayLength" : 10,
41
                "iDisplayLength" : 10,
-
 
42
                "sDom": 'T<"clear">lfrtip',
-
 
43
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},                
40
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
44
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
41
            });
45
            });
42
        }
46
        }
43
    });
47
    });
44
}
48
}
Line 50... Line 54...
50
        success : function(response) {
54
        success : function(response) {
51
            $('#' + domId).html(response);
55
            $('#' + domId).html(response);
52
            userCommunicationTable = $('#user-communications').dataTable({
56
            userCommunicationTable = $('#user-communications').dataTable({
53
                "aaSorting" : [ [ 0, 'desc' ] ],
57
                "aaSorting" : [ [ 0, 'desc' ] ],
54
                "iDisplayLength" : 5,
58
                "iDisplayLength" : 5,
-
 
59
                "sDom": 'T<"clear">lfrtip',
-
 
60
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},                
55
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
61
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
56
            });
62
            });
57
        }
63
        }
58
    });
64
    });
59
}
65
}
Line 145... Line 151...
145
        success : function(response) {
151
        success : function(response) {
146
            $('#' + domId).html(response);
152
            $('#' + domId).html(response);
147
            var ticketTable = $('#user-tickets').dataTable({
153
            var ticketTable = $('#user-tickets').dataTable({
148
                "aaSorting" : [ [ 2, 'desc' ] ],
154
                "aaSorting" : [ [ 2, 'desc' ] ],
149
                "iDisplayLength" : 5,
155
                "iDisplayLength" : 5,
-
 
156
                "sDom": 'T<"clear">lfrtip',
-
 
157
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},                
150
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
158
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
151
            });
159
            });
152
            if (ticketId) {
160
            if (ticketId) {
153
                loadTicketInfo("bottom-infopane", ticketId, ticketTable, null);
161
                loadTicketInfo("bottom-infopane", ticketId, ticketTable, null);
154
            }
162
            }
Line 176... Line 184...
176
        success : function(response) {
184
        success : function(response) {
177
            $('#' + domId).html(response);
185
            $('#' + domId).html(response);
178
            var activityTable = $('#user-activity').dataTable({
186
            var activityTable = $('#user-activity').dataTable({
179
                "aaSorting" : [ [ 4, 'desc' ] ],
187
                "aaSorting" : [ [ 4, 'desc' ] ],
180
                "iDisplayLength" : 5,
188
                "iDisplayLength" : 5,
-
 
189
                "sDom": 'T<"clear">lfrtip',
-
 
190
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},
181
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
191
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
182
            });
192
            });
183
        }
193
        }
184
    });
194
    });
185
}
195
}
Line 211... Line 221...
211
        success : function(response) {
221
        success : function(response) {
212
            $('#' + domId).html(response);
222
            $('#' + domId).html(response);
213
            var ticketTable = $('#user-tickets').dataTable({
223
            var ticketTable = $('#user-tickets').dataTable({
214
                "aaSorting" : [ [ 2, 'desc' ] ],
224
                "aaSorting" : [ [ 2, 'desc' ] ],
215
                "iDisplayLength" : 5,
225
                "iDisplayLength" : 5,
-
 
226
                "sDom": 'T<"clear">lfrtip',
-
 
227
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},
216
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
228
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
217
            });
229
            });
218
            loadTicketInfo("bottom-infopane", ticketId, ticketTable, null);
230
            loadTicketInfo("bottom-infopane", ticketId, ticketTable, null);
219
        }
231
        }
220
    });
232
    });
Line 228... Line 240...
228
        success : function(response) {
240
        success : function(response) {
229
            $('#' + domId).html(response);
241
            $('#' + domId).html(response);
230
            var ticketTable = $('#user-tickets').dataTable({
242
            var ticketTable = $('#user-tickets').dataTable({
231
                "aaSorting" : [ [ 2, 'desc' ] ],
243
                "aaSorting" : [ [ 2, 'desc' ] ],
232
                "iDisplayLength" : 5,
244
                "iDisplayLength" : 5,
-
 
245
                "sDom": 'T<"clear">lfrtip',
-
 
246
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},
233
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
247
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
234
            });
248
            });
235
        }
249
        }
236
    });
250
    });
237
}
251
}
Line 244... Line 258...
244
        success : function(response) {
258
        success : function(response) {
245
            $('#' + domId).html(response);
259
            $('#' + domId).html(response);
246
            var activityTable = $('#user-activity').dataTable({
260
            var activityTable = $('#user-activity').dataTable({
247
                "aaSorting" : [ [ 4, 'desc' ] ],
261
                "aaSorting" : [ [ 4, 'desc' ] ],
248
                "iDisplayLength" : 5,
262
                "iDisplayLength" : 5,
-
 
263
                "sDom": 'T<"clear">lfrtip',
-
 
264
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},
249
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
265
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
250
            });
266
            });
251
        }
267
        }
252
    });
268
    });
253
}
269
}
254
 
270
 
255
function goToHomePage() {
271
function goToHomePage() {
256
    document.location.href = "/crm";
272
    document.location.href = "/crm";
257
}
273
}
258
 
274
 
259
function loadMyOpenTickets(domId) {
275
function loadTickets(domId, getURL) {
260
    $.ajax({
276
    $.ajax({
261
        type : "GET",
277
        type : "GET",
262
        url : "/crm/tickets!getMyOpenTickets",
-
 
263
        success : function(response) {
-
 
264
            $('#' + domId).html(response);
-
 
265
            var ticketTable = $('table#tickets').dataTable({
-
 
266
                "aaSorting" : [ [ 3, 'desc' ] ],
-
 
267
                "iDisplayLength" : 5,
-
 
268
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
-
 
269
            });
-
 
270
        }
-
 
271
    });
-
 
272
}
-
 
273
 
-
 
274
function loadMyTickets(domId) {
-
 
275
    $.ajax({
-
 
276
        type : "GET",
-
 
277
        url : "/crm/tickets!getMyTickets",
-
 
278
        success : function(response) {
-
 
279
            $('#' + domId).html(response);
-
 
280
            var ticketTable = $('table#tickets').dataTable({
-
 
281
                "aaSorting" : [ [ 3, 'desc' ] ],
-
 
282
                "iDisplayLength" : 5,
-
 
283
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
-
 
284
            });
-
 
285
        }
-
 
286
    });
-
 
287
}
-
 
288
 
-
 
289
function loadUnassignedTickets(domId) {
-
 
290
    $.ajax({
-
 
291
        type : "GET",
-
 
292
        url : "/crm/tickets!getUnassignedTickets",
-
 
293
        success : function(response) {
-
 
294
            $('#' + domId).html(response);
-
 
295
            var ticketTable = $('table#tickets').dataTable({
-
 
296
                "aaSorting" : [ [ 3, 'desc' ] ],
-
 
297
                "iDisplayLength" : 5,
-
 
298
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
-
 
299
            });
-
 
300
        }
-
 
301
    });
-
 
302
}
-
 
303
 
-
 
304
function loadAllOpenTickets(domId) {
-
 
305
    $.ajax({
-
 
306
        type : "GET",
-
 
307
        url : "/crm/tickets!getAllOpenTickets",
-
 
308
        success : function(response) {
-
 
309
            $('#' + domId).html(response);
-
 
310
            var ticketTable = $('table#tickets').dataTable({
-
 
311
                "aaSorting" : [ [ 3, 'desc' ] ],
-
 
312
                "iDisplayLength" : 5,
-
 
313
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
-
 
314
            });
-
 
315
        }
-
 
316
    });
-
 
317
}
-
 
318
 
-
 
319
function loadAllTickets(domId) {
-
 
320
    $.ajax({
-
 
321
        type : "GET",
278
        url : getURL,
322
        url : "/crm/tickets!getAllTickets",
-
 
323
        success : function(response) {
279
        success : function(response) {
324
            $('#' + domId).html(response);
280
            $('#' + domId).html(response);
325
            var ticketTable = $('table#tickets').dataTable({
281
            var ticketTable = $('table#tickets').dataTable({
326
                "aaSorting" : [ [ 3, 'desc' ] ],
282
                "aaSorting" : [ [ 3, 'desc' ] ],
327
                "iDisplayLength" : 5,
283
                "iDisplayLength" : 5,
-
 
284
                "sDom": 'T<"clear">lfrtip',
-
 
285
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},
328
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
286
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
329
            });
287
            });
330
        }
288
        }
331
    });
289
    });
332
}
290
}
Line 355... Line 313...
355
        success : function(response) {
313
        success : function(response) {
356
            $.html(response);
314
            $.html(response);
357
            var ticketTable = $('table#tickets').dataTable({
315
            var ticketTable = $('table#tickets').dataTable({
358
                "aaSorting" : [ [ 3, 'desc' ] ],
316
                "aaSorting" : [ [ 3, 'desc' ] ],
359
                "iDisplayLength" : 5,
317
                "iDisplayLength" : 5,
-
 
318
                "sDom": 'T<"clear">lfrtip',
-
 
319
                "oTableTools": {"sSwfPath": "swf/copy_cvs_xls_pdf.swf"},
360
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
320
                "aLengthMenu" : [ [ 5, 10, 20, -1 ], [ 5, 10, 20, "All" ] ]
361
            });
321
            });
362
        }
322
        }
363
    });
323
    });
364
}
324
}
365
325