| 2674 |
vikas |
1 |
$(function() {
|
| 3228 |
mandeep.dh |
2 |
$("a.show-order-details").live('click', function() {
|
|
|
3 |
var orderId = $(this).attr('orderId');
|
| 3499 |
mandeep.dh |
4 |
loadOrderInfo("bottom-infopane", orderId);
|
| 3228 |
mandeep.dh |
5 |
});
|
| 3206 |
mandeep.dh |
6 |
|
| 3228 |
mandeep.dh |
7 |
$("a.show-user-details").live('click', function() {
|
|
|
8 |
var userId = $(this).attr('userId');
|
|
|
9 |
loadUserPane("infopane", userId);
|
|
|
10 |
});
|
| 5168 |
amar.kumar |
11 |
|
|
|
12 |
$("a.agent-ticket-count").live('click', function() {
|
|
|
13 |
loadTickets('infopane', "/crm/tickets!searchTickets?agentIds=" + $(this).attr('agentId') +"&status=OPEN");
|
|
|
14 |
});
|
| 6111 |
anupam.sin |
15 |
|
|
|
16 |
$("a.show-recharge-orders").live('click', function() {
|
|
|
17 |
var userId = $(this).attr('userId');
|
|
|
18 |
loadRechargeOrderPane("infopane", userId, 0);
|
|
|
19 |
});
|
|
|
20 |
|
|
|
21 |
$("a.show-recharge-details").live('click', function() {
|
|
|
22 |
var orderId = $(this).attr('orderId');
|
|
|
23 |
loadRechargeOrderInfo("bottom-infopane", orderId);
|
|
|
24 |
});
|
| 3090 |
mandeep.dh |
25 |
|
| 3228 |
mandeep.dh |
26 |
$("a.show-orders").live('click', function() {
|
|
|
27 |
var userId = $(this).attr('userId');
|
|
|
28 |
loadOrderPane("infopane", userId, 0);
|
|
|
29 |
});
|
| 19072 |
manish.sha |
30 |
|
|
|
31 |
$("a.show-return-tickets").live('click', function(){
|
|
|
32 |
var userId = $(this).attr('userId');
|
|
|
33 |
loadReturnTxnPane("infopane", userId, 0);
|
|
|
34 |
});
|
| 3090 |
mandeep.dh |
35 |
|
| 3228 |
mandeep.dh |
36 |
$("a.show-cart").live('click', function() {
|
|
|
37 |
var userId = $(this).attr('userId');
|
|
|
38 |
var cartId = $(this).attr('cartId');
|
|
|
39 |
loadCartPane("infopane", userId, cartId);
|
|
|
40 |
});
|
| 3090 |
mandeep.dh |
41 |
|
| 3228 |
mandeep.dh |
42 |
$("a.show-line-details").live('click', function() {
|
|
|
43 |
var userId = $(this).attr('userId');
|
|
|
44 |
var itemId = $(this).attr('itemId');
|
|
|
45 |
loadLineInfo("bottom-infopane", userId, itemId);
|
|
|
46 |
});
|
| 3090 |
mandeep.dh |
47 |
|
| 3228 |
mandeep.dh |
48 |
$("a.show-tickets").live('click', function() {
|
|
|
49 |
var userId = $(this).attr('userId');
|
| 3405 |
mandeep.dh |
50 |
loadTickets('infopane', "/crm/tickets!searchTickets?userId=" + userId);
|
| 3228 |
mandeep.dh |
51 |
});
|
| 3090 |
mandeep.dh |
52 |
|
| 3228 |
mandeep.dh |
53 |
$("a.show-activity").live('click', function() {
|
|
|
54 |
var userId = $(this).attr('userId');
|
| 3405 |
mandeep.dh |
55 |
listActivities('infopane', "userId=" + userId);
|
| 3228 |
mandeep.dh |
56 |
});
|
| 3090 |
mandeep.dh |
57 |
|
| 3228 |
mandeep.dh |
58 |
$("a.show-ticket-details").live('click', function() {
|
|
|
59 |
var ticketId = $(this).attr('ticketId');
|
| 3405 |
mandeep.dh |
60 |
|
| 3228 |
mandeep.dh |
61 |
// will be set when ticket Id link is clicked from activity page
|
|
|
62 |
var activityId = $(this).attr('activityId');
|
|
|
63 |
loadTicketInfo("bottom-infopane", ticketId, null, activityId);
|
|
|
64 |
});
|
| 4241 |
anupam.sin |
65 |
|
|
|
66 |
$("a.show-activity-description").live('click', function() {
|
|
|
67 |
loadActivityDescription("activity-description-pane", this);
|
|
|
68 |
});
|
| 3090 |
mandeep.dh |
69 |
|
| 3228 |
mandeep.dh |
70 |
$("a.show-activity-details").live('click', function() {
|
|
|
71 |
var activityId = $(this).attr('activityId');
|
| 3422 |
mandeep.dh |
72 |
loadActivityInfo("bottom-infopane", activityId);
|
| 3228 |
mandeep.dh |
73 |
});
|
| 4241 |
anupam.sin |
74 |
|
| 3228 |
mandeep.dh |
75 |
$("a.create-ticket").live('click', function() {
|
| 3405 |
mandeep.dh |
76 |
var userId = $(this).attr('userId');
|
|
|
77 |
|
|
|
78 |
var params = null;
|
|
|
79 |
if (userId != null && userId != "") {
|
|
|
80 |
params = "userId=" + userId;
|
|
|
81 |
}
|
|
|
82 |
|
|
|
83 |
loadTicketCreationForm("infopane", params);
|
| 3228 |
mandeep.dh |
84 |
});
|
| 3206 |
mandeep.dh |
85 |
|
| 3228 |
mandeep.dh |
86 |
$("a.create-activity").live('click', function() {
|
|
|
87 |
var userId = $(this).attr('userId');
|
| 3090 |
mandeep.dh |
88 |
|
| 3405 |
mandeep.dh |
89 |
var params = null;
|
|
|
90 |
if (userId != null && userId != "") {
|
|
|
91 |
params = "userId=" + userId;
|
|
|
92 |
}
|
|
|
93 |
|
|
|
94 |
loadActivityCreationForm("infopane", params);
|
| 3339 |
mandeep.dh |
95 |
});
|
|
|
96 |
|
| 3228 |
mandeep.dh |
97 |
$('#update-ticket-form').live('submit', function() {
|
|
|
98 |
var ticketId = $(this).attr('ticketId');
|
|
|
99 |
updateTicket("infopane", ticketId, $(this).serialize());
|
|
|
100 |
return false;
|
|
|
101 |
});
|
| 3206 |
mandeep.dh |
102 |
|
| 3228 |
mandeep.dh |
103 |
$('form#mail-form').live(
|
|
|
104 |
'submit',
|
|
|
105 |
function() {
|
| 4163 |
mandeep.dh |
106 |
var body = $('#mail-body').val().trim();
|
|
|
107 |
if (body == null || body == '') {
|
|
|
108 |
alert('Please specify body of the mail');
|
|
|
109 |
}
|
|
|
110 |
else {
|
| 4164 |
mandeep.dh |
111 |
var ticketId = $('#update-ticket-form').attr('ticketId');
|
| 4163 |
mandeep.dh |
112 |
updateTicket("infopane", ticketId, $(this).serialize() + '&'
|
|
|
113 |
+ $('#update-ticket-form').serialize());
|
|
|
114 |
$.colorbox.close();
|
|
|
115 |
}
|
|
|
116 |
|
| 3228 |
mandeep.dh |
117 |
return false;
|
|
|
118 |
});
|
| 3106 |
mandeep.dh |
119 |
|
| 4020 |
mandeep.dh |
120 |
$('form#escalation-form').live(
|
|
|
121 |
'submit',
|
|
|
122 |
function() {
|
|
|
123 |
var ticketId = $('#update-ticket-form').attr('ticketId');
|
|
|
124 |
updateTicket("infopane", ticketId, $(this).serialize() + '&'
|
|
|
125 |
+ $('#update-ticket-form').serialize());
|
|
|
126 |
$.colorbox.close();
|
|
|
127 |
return false;
|
|
|
128 |
});
|
| 4241 |
anupam.sin |
129 |
|
| 4705 |
anupam.sin |
130 |
$('form#cancel-form').live('submit',
|
|
|
131 |
function() {
|
| 7399 |
anupam.sin |
132 |
if( $('#cancelReasonBox').attr('style') && !($('#cancelReasonBox').attr('style').indexOf('none'))) {
|
|
|
133 |
var body = $('#cancel-body').val().trim();
|
| 4705 |
anupam.sin |
134 |
if (body == null || body == '') {
|
|
|
135 |
alert('Please specify description');
|
|
|
136 |
return false;
|
|
|
137 |
}
|
|
|
138 |
}
|
| 19072 |
manish.sha |
139 |
|
|
|
140 |
var canceltype = $("div#cancel-div").attr('cancelType');
|
| 4705 |
anupam.sin |
141 |
var ticketId = $('.display-cancel-order-popup').attr('ticketId');
|
|
|
142 |
var orderStatus = $('.display-cancel-order-popup').attr('orderStatus');
|
| 19072 |
manish.sha |
143 |
if(canceltype=='txn'){
|
|
|
144 |
var orderId = $('.display-cancel-order-popup').attr('orderId');
|
|
|
145 |
cancelOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
|
|
|
146 |
}
|
|
|
147 |
else{
|
|
|
148 |
var transactionId = $('.display-cancel-order-popup').attr('transactionId');
|
|
|
149 |
cancelTxn("bottom-infopane", ticketId, transactionId, orderStatus, $(this).serialize());
|
|
|
150 |
}
|
| 4705 |
anupam.sin |
151 |
$.colorbox.close();
|
|
|
152 |
return false;
|
|
|
153 |
});
|
| 7393 |
anupam.sin |
154 |
|
|
|
155 |
$('#cancel-store-order-form').live('submit',
|
|
|
156 |
function() {
|
| 7399 |
anupam.sin |
157 |
if( $('#cancelReasonBox').attr('style') && !($('#cancelReasonBox').attr('style').indexOf('none'))) {
|
|
|
158 |
var body = $('#cancel-body').val().trim();
|
| 7393 |
anupam.sin |
159 |
if (body == null || body == '') {
|
|
|
160 |
alert('Please specify description');
|
|
|
161 |
return false;
|
|
|
162 |
}
|
|
|
163 |
}
|
|
|
164 |
var ticketId = $('.display-cancel-store-order-popup').attr('ticketId');
|
|
|
165 |
var orderId = $('.display-cancel-store-order-popup').attr('orderId');
|
|
|
166 |
var orderStatus = $('.display-cancel-store-order-popup').attr('orderStatus');
|
|
|
167 |
cancelStoreOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
|
|
|
168 |
$.colorbox.close();
|
|
|
169 |
return false;
|
|
|
170 |
});
|
| 4020 |
mandeep.dh |
171 |
|
| 3228 |
mandeep.dh |
172 |
$('form#activity-mail-form').live(
|
|
|
173 |
'submit',
|
|
|
174 |
function() {
|
|
|
175 |
createActivity("infopane", $(this).serialize() + '&' + $("#create-activity-form").serialize());
|
|
|
176 |
$.colorbox.close();
|
|
|
177 |
return false;
|
|
|
178 |
});
|
| 3106 |
mandeep.dh |
179 |
|
| 3405 |
mandeep.dh |
180 |
$('#create-activity-form').live('submit', function() {
|
|
|
181 |
createActivity("infopane", $(this).serialize());
|
| 3339 |
mandeep.dh |
182 |
return false;
|
|
|
183 |
});
|
|
|
184 |
|
| 3228 |
mandeep.dh |
185 |
$('#create-ticket-form').live('submit', function() {
|
|
|
186 |
createTicket("infopane", $(this).serialize());
|
|
|
187 |
return false;
|
|
|
188 |
});
|
| 3106 |
mandeep.dh |
189 |
|
| 3228 |
mandeep.dh |
190 |
$(".home-page").click(function() {
|
|
|
191 |
goToHomePage();
|
|
|
192 |
});
|
| 3106 |
mandeep.dh |
193 |
|
| 3228 |
mandeep.dh |
194 |
$(".my-open-tickets").live('click', function() {
|
| 4008 |
mandeep.dh |
195 |
loadTickets('infopane', "/crm/tickets!searchTickets?agentIds=" + $(this).attr('agentIds') +"&status=OPEN");
|
| 3228 |
mandeep.dh |
196 |
});
|
| 3151 |
mandeep.dh |
197 |
|
| 3228 |
mandeep.dh |
198 |
$(".unassigned-tickets").live('click', function() {
|
| 3234 |
mandeep.dh |
199 |
loadTickets('infopane', "/crm/tickets!getUnassignedTickets");
|
| 3151 |
mandeep.dh |
200 |
});
|
|
|
201 |
|
| 4065 |
mandeep.dh |
202 |
$("#spinner-div").ajaxSend(function(evt, request, settings) {
|
|
|
203 |
if (settings.url != '/crm') {
|
|
|
204 |
$(this).show();
|
|
|
205 |
}
|
| 3228 |
mandeep.dh |
206 |
});
|
|
|
207 |
|
| 4065 |
mandeep.dh |
208 |
$("#spinner-div").ajaxComplete(function(evt, request, settings) {
|
|
|
209 |
if (settings.url != '/crm') {
|
|
|
210 |
$(this).hide();
|
|
|
211 |
}
|
| 3228 |
mandeep.dh |
212 |
});
|
|
|
213 |
|
|
|
214 |
$("select#activity-type").live('change', function() {
|
| 3422 |
mandeep.dh |
215 |
processActivityTypeChange($(this).val());
|
| 3228 |
mandeep.dh |
216 |
});
|
| 5225 |
amar.kumar |
217 |
|
| 19072 |
manish.sha |
218 |
/*$("select#ticketCategory").live('change', function() {
|
|
|
219 |
var categoryType = $(this).val();
|
|
|
220 |
if(categoryType != "DOA_RECEIVED") {
|
|
|
221 |
$('input#orderQty').hide();
|
|
|
222 |
$('input#orderQty').removeClass('required digits');
|
|
|
223 |
}else if(categoryType != "RETURN_FORM"){
|
|
|
224 |
$('input#orderQty').hide();
|
|
|
225 |
$('input#orderQty').removeClass('required digits');
|
|
|
226 |
}else {
|
|
|
227 |
$('input#orderQty').show();
|
|
|
228 |
$('input#orderQty').addClass('required digits');
|
|
|
229 |
}
|
|
|
230 |
});*/
|
|
|
231 |
|
| 5225 |
amar.kumar |
232 |
$("select#common-activity-desc").live('change', function() {
|
|
|
233 |
changeActivityFormValidCriteria($(this).val());
|
|
|
234 |
});
|
| 3397 |
mandeep.dh |
235 |
|
| 3339 |
mandeep.dh |
236 |
$(".list-my-activity").live('click', function() {
|
|
|
237 |
listActivities('infopane', "");
|
|
|
238 |
});
|
|
|
239 |
|
|
|
240 |
$(".list-customer-activity").live('click', function() {
|
| 14905 |
manish.sha |
241 |
listActivities('infopane', "creatorId=1¬ShowPmTickets=yes");
|
| 3339 |
mandeep.dh |
242 |
});
|
| 3390 |
mandeep.dh |
243 |
|
|
|
244 |
$("#mark-as-read").live('click', function() {
|
|
|
245 |
var activityId = $(this).attr('activityId');
|
|
|
246 |
markAsRead(activityId);
|
|
|
247 |
});
|
| 3397 |
mandeep.dh |
248 |
|
| 4490 |
anupam.sin |
249 |
$("#deny-doa").live('click', function() {
|
|
|
250 |
var ticketId = $(this).attr('ticketId');
|
|
|
251 |
var orderId = $(this).attr('orderId');
|
|
|
252 |
denyDOA(orderId, ticketId);
|
|
|
253 |
});
|
|
|
254 |
|
|
|
255 |
$("#authorize-doa").live('click', function() {
|
|
|
256 |
var ticketId = $(this).attr('ticketId');
|
|
|
257 |
var orderId = $(this).attr('orderId');
|
|
|
258 |
authorizeDOA(orderId, ticketId);
|
|
|
259 |
});
|
|
|
260 |
|
|
|
261 |
$("#deny-return").live('click', function() {
|
|
|
262 |
var ticketId = $(this).attr('ticketId');
|
|
|
263 |
var orderId = $(this).attr('orderId');
|
|
|
264 |
denyReturn(orderId, ticketId);
|
|
|
265 |
});
|
|
|
266 |
|
|
|
267 |
$("#authorize-return").live('click', function() {
|
|
|
268 |
var ticketId = $(this).attr('ticketId');
|
|
|
269 |
var orderId = $(this).attr('orderId');
|
|
|
270 |
authorizeReturn(orderId, ticketId);
|
|
|
271 |
});
|
|
|
272 |
|
| 4267 |
anupam.sin |
273 |
$("#block-payment").live('click', function() {
|
|
|
274 |
var transactionId = $(this).attr('transactionId');
|
|
|
275 |
var ticketId = $(this).attr('ticketId');
|
| 4438 |
anupam.sin |
276 |
var paymentId = $(this).attr('paymentId');
|
|
|
277 |
blockPayment(transactionId, ticketId, paymentId);
|
| 4267 |
anupam.sin |
278 |
});
|
|
|
279 |
|
|
|
280 |
$("#allow-payment").live('click', function() {
|
|
|
281 |
var transactionId = $(this).attr('transactionId');
|
|
|
282 |
var ticketId = $(this).attr('ticketId');
|
| 4438 |
anupam.sin |
283 |
var paymentId = $(this).attr('paymentId');
|
|
|
284 |
allowPayment(transactionId, ticketId, paymentId);
|
| 4267 |
anupam.sin |
285 |
});
|
|
|
286 |
|
| 3397 |
mandeep.dh |
287 |
$("form#search").live('submit', function() {
|
|
|
288 |
if ($('#searchEntity').val() == 'Tickets') {
|
|
|
289 |
loadTickets('infopane', "/crm/tickets!searchTickets?" + $(this).serialize());
|
|
|
290 |
}
|
|
|
291 |
else {
|
|
|
292 |
listActivities('infopane', $(this).serialize());
|
|
|
293 |
}
|
|
|
294 |
|
|
|
295 |
$.colorbox.close();
|
|
|
296 |
return false;
|
|
|
297 |
});
|
|
|
298 |
|
|
|
299 |
$(".advanced-search").live('click', function() {
|
|
|
300 |
loadAdvancedSearchBox();
|
|
|
301 |
return false;
|
|
|
302 |
});
|
|
|
303 |
|
|
|
304 |
$("select#searchEntity").live('change', function() {
|
|
|
305 |
var searchEntity = $(this).val();
|
|
|
306 |
processSearchEntityChange(searchEntity);
|
|
|
307 |
});
|
| 3499 |
mandeep.dh |
308 |
|
|
|
309 |
$('.pending-cod-verification-tickets').live('click', function() {
|
| 3546 |
mandeep.dh |
310 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=COD_VERIFICATION&status=OPEN");
|
|
|
311 |
return false;
|
| 3499 |
mandeep.dh |
312 |
});
|
| 3546 |
mandeep.dh |
313 |
|
| 3578 |
mandeep.dh |
314 |
$('.open-failed-payments-tickets').live('click', function() {
|
|
|
315 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=FAILED_PAYMENTS&status=OPEN");
|
|
|
316 |
return false;
|
|
|
317 |
});
|
| 4267 |
anupam.sin |
318 |
|
|
|
319 |
$('.open-flagged-payments-tickets').live('click', function() {
|
|
|
320 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=PAYMENT_FLAGGED&status=OPEN");
|
|
|
321 |
return false;
|
|
|
322 |
});
|
| 4490 |
anupam.sin |
323 |
|
|
|
324 |
$('.doa-request-tickets').live('click', function() {
|
|
|
325 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=DOA_RECEIVED&status=OPEN");
|
|
|
326 |
return false;
|
|
|
327 |
});
|
|
|
328 |
|
|
|
329 |
$('.return-request-tickets').live('click', function() {
|
|
|
330 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=RETURN_FORM&status=OPEN");
|
|
|
331 |
return false;
|
|
|
332 |
});
|
| 4751 |
anupam.sin |
333 |
|
| 7372 |
kshitij.so |
334 |
$('.low-inventory-tickets').live('click', function() {
|
|
|
335 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=LOW_INVENTORY_CANCELLED_ORDERS&status=OPEN");
|
|
|
336 |
return false;
|
|
|
337 |
});
|
|
|
338 |
|
| 7616 |
manish.sha |
339 |
//Start:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
|
|
340 |
$('.rto-refunds-tickets').live('click', function() {
|
|
|
341 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=RTO_REFUND&status=OPEN");
|
|
|
342 |
return false;
|
|
|
343 |
});
|
|
|
344 |
//End:- Added By Manish Sharma for Creating a new Ticket: Category- RTO Refund on 21-Jun-2013
|
|
|
345 |
|
| 11890 |
kshitij.so |
346 |
$('.bulk-order-enquiry-tickets').live('click', function() {
|
|
|
347 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=Bulk_Order_ENQUIRY&status=OPEN");
|
|
|
348 |
return false;
|
|
|
349 |
});
|
|
|
350 |
|
| 14895 |
manish.sha |
351 |
$('.profit-mandi-tickets').live('click',function(){
|
| 14882 |
manish.sha |
352 |
loadTickets('infopane', "/crm/tickets!loadProfitMandiTickets");
|
|
|
353 |
return false;
|
| 14896 |
manish.sha |
354 |
});
|
| 14882 |
manish.sha |
355 |
|
| 4751 |
anupam.sin |
356 |
$('#order-cancellation-tickets').live('click', function() {
|
|
|
357 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=ORDER_CANCELLATION&status=OPEN");
|
|
|
358 |
return false;
|
|
|
359 |
});
|
| 3578 |
mandeep.dh |
360 |
|
| 4008 |
mandeep.dh |
361 |
$('.open-delayed-delivery-tickets').live('click', function() {
|
|
|
362 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=DELAYED_DELIVERY&status=OPEN");
|
|
|
363 |
return false;
|
|
|
364 |
});
|
| 5858 |
amar.kumar |
365 |
|
|
|
366 |
$('#store-pickup-tickets').live('click', function() {
|
|
|
367 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=STORE_PICKUP&status=OPEN");
|
|
|
368 |
return false;
|
|
|
369 |
});
|
| 4008 |
mandeep.dh |
370 |
|
| 3499 |
mandeep.dh |
371 |
$('.trust-level-increase').live('click', function() {
|
|
|
372 |
increaseTrustLevel('infopane', $('input#trust-level-increase').attr('userId'), $('input#trust-level-increase').val());
|
|
|
373 |
});
|
|
|
374 |
|
| 11890 |
kshitij.so |
375 |
$('.add-to-private-deal').live('click', function() {
|
|
|
376 |
addPrivateDealUser('infopane', $('.add-to-private-deal').attr('userId'));
|
|
|
377 |
});
|
|
|
378 |
|
|
|
379 |
$('.change-private-deal-user-status').live('click', function() {
|
|
|
380 |
if (!(confirm('Are you sure about this action?'))){
|
|
|
381 |
return false;
|
|
|
382 |
}
|
|
|
383 |
changePrivateDealUserStatus('infopane', $('.change-private-deal-user-status').attr('userId'),$('.change-private-deal-user-status').attr('active'));
|
|
|
384 |
});
|
|
|
385 |
|
|
|
386 |
$('.reset-private-deal-user-password').live('click', function() {
|
|
|
387 |
if (!(confirm('Are you sure want to reset password?'))){
|
|
|
388 |
return false;
|
|
|
389 |
}
|
|
|
390 |
resetPasswordForPrivateDealUser('infopane', $('.reset-private-deal-user-password').attr('userId'));
|
|
|
391 |
});
|
|
|
392 |
|
| 3546 |
mandeep.dh |
393 |
$('.update-order-status').live('click', function() {
|
|
|
394 |
updateOrderStatus('bottom-infopane', $(this).attr('ticketId'), $(this).attr('orderId'), $(this).attr('orderStatus'));
|
| 3499 |
mandeep.dh |
395 |
});
|
| 4241 |
anupam.sin |
396 |
|
| 19072 |
manish.sha |
397 |
$('.update-txn-status').live('click', function() {
|
|
|
398 |
updateTxnStatus('bottom-infopane', $(this).attr('ticketId'), $(this).attr('transactionId'), $(this).attr('orderStatus'));
|
|
|
399 |
});
|
|
|
400 |
|
| 3711 |
mandeep.dh |
401 |
|
|
|
402 |
$('.list-my-unread-activity').live('click', function() {
|
|
|
403 |
loadUnreadActivities('infopane');
|
|
|
404 |
});
|
| 4142 |
mandeep.dh |
405 |
|
|
|
406 |
$('form.change-address').live('submit', function() {
|
|
|
407 |
changeAddress($(this).serialize());
|
|
|
408 |
});
|
| 4681 |
amar.kumar |
409 |
|
| 7372 |
kshitij.so |
410 |
$('.display-cancel-order-popup').live('click', function(){
|
| 19072 |
manish.sha |
411 |
var orderId = $('.display-cancel-order-popup').attr('orderId');
|
|
|
412 |
if(orderId==undefined){
|
|
|
413 |
var transactionId = $('.display-cancel-order-popup').attr('transactionId');
|
|
|
414 |
displayCancelOrderPopUp("txn");
|
|
|
415 |
}else{
|
|
|
416 |
displayCancelOrderPopUp("order");
|
|
|
417 |
}
|
| 4689 |
anupam.sin |
418 |
});
|
|
|
419 |
|
| 7393 |
anupam.sin |
420 |
$('.display-cancel-store-order-popup').live('click', function(){
|
|
|
421 |
displayCancelStoreOrderPopUp();
|
|
|
422 |
});
|
|
|
423 |
|
| 4681 |
amar.kumar |
424 |
$('input.cancelReason').live('change', function(){
|
|
|
425 |
showHidecancelReasonDiv($(this).attr('id'));
|
|
|
426 |
});
|
| 4793 |
amar.kumar |
427 |
|
|
|
428 |
$('a.manage-agents').live('click', function() {
|
|
|
429 |
loadAgentsInfo("infopane");
|
|
|
430 |
});
|
|
|
431 |
|
| 19072 |
manish.sha |
432 |
/*$('a.process-returns').live('click', function() {
|
|
|
433 |
loadReturnTxnsInfo("infopane");
|
|
|
434 |
});*/
|
|
|
435 |
|
| 5909 |
amar.kumar |
436 |
$('a.open-tickets').live('click', function() {
|
|
|
437 |
loadAllOpenTickets("infopane");
|
|
|
438 |
});
|
|
|
439 |
|
|
|
440 |
$('a.open-ticket-count').live('click', function() {
|
|
|
441 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=" + $(this).attr('category') + "&status=OPEN");
|
|
|
442 |
});
|
|
|
443 |
|
| 4793 |
amar.kumar |
444 |
$('a#create-agent').live('click', function() {
|
|
|
445 |
loadAgentCreationForm();
|
|
|
446 |
});
|
|
|
447 |
|
|
|
448 |
$('a#deactivate-agent').live('click', function() {
|
|
|
449 |
deactivateAgentPopup();
|
|
|
450 |
});
|
|
|
451 |
|
|
|
452 |
$('a#change-password').live('click', function() {
|
|
|
453 |
changeAgentPasswordPopup();
|
|
|
454 |
});
|
|
|
455 |
|
| 5168 |
amar.kumar |
456 |
$('a#change-role').live('click', function() {
|
|
|
457 |
changeAgentRolePopup();
|
|
|
458 |
});
|
|
|
459 |
|
| 4793 |
amar.kumar |
460 |
$('input#deactivate-agent').live('click', function() {
|
|
|
461 |
deactivateAgent($('#deactivate-agent-email').val(),$('#deactivate-agent-email').find(':selected')[0].id);
|
|
|
462 |
});
|
|
|
463 |
|
|
|
464 |
$('#create-agent-form').live('submit', function() {
|
|
|
465 |
if(validateAgentCreationForm()){
|
|
|
466 |
var managerId = $('#manager-email-id').find(':selected')[0].id;
|
|
|
467 |
createAgent($(this).serialize(), managerId);
|
|
|
468 |
}
|
|
|
469 |
});
|
|
|
470 |
|
| 5168 |
amar.kumar |
471 |
$('#change-agent-role-form').live('submit', function() {
|
|
|
472 |
if($('#changed-role')[0].value!=""||$('#changed-role')[0].value!=undefined){
|
|
|
473 |
changeAgentRole($(this).serialize());
|
|
|
474 |
} else {
|
|
|
475 |
alert("Please choose roles before proceeding");
|
|
|
476 |
}
|
|
|
477 |
});
|
|
|
478 |
|
| 4793 |
amar.kumar |
479 |
$('#change-agent-password').live('click', function() {
|
|
|
480 |
updateAgentPassword();
|
|
|
481 |
});
|
| 5791 |
anupam.sin |
482 |
|
|
|
483 |
$('.extend-expiry').live('click', function() {
|
|
|
484 |
var pickupExtension = $('#pickupExtension').val();
|
| 5917 |
anupam.sin |
485 |
extendExpiryDate('bottom-infopane', $(this).attr('ticketId'), $(this).attr('orderId'), pickupExtension);
|
| 5791 |
anupam.sin |
486 |
});
|
| 6507 |
anupam.sin |
487 |
|
|
|
488 |
$('#refund-recharge-order').live('click', function() {
|
|
|
489 |
var orderId = $(this).attr('orderId');
|
|
|
490 |
refundRechargeOrder(orderId, "bottom-infopane");
|
|
|
491 |
});
|
| 6985 |
anupam.sin |
492 |
|
|
|
493 |
$('#changeShippingAddress').live('click', function() {
|
|
|
494 |
$('#changeShippingAddress').hide();
|
|
|
495 |
$('#shippingAddressFrm').slideDown(100);
|
|
|
496 |
});
|
|
|
497 |
|
|
|
498 |
$('#cancelAddressChange').live('click', function() {
|
|
|
499 |
$('#shippingAddressFrm').slideUp(100, function(){
|
|
|
500 |
$('#changeShippingAddress').show();
|
|
|
501 |
});
|
|
|
502 |
});
|
|
|
503 |
|
|
|
504 |
$('#submitNewAddress').live('click', function(){
|
|
|
505 |
var orderId = $(this).attr('orderId');
|
|
|
506 |
changeShippingAddress(orderId);
|
|
|
507 |
});
|
| 7645 |
anupam.sin |
508 |
|
| 7730 |
anupam.sin |
509 |
$('#storeToNormal').live('click', function() {
|
| 7731 |
anupam.sin |
510 |
var orderId = $('#storeToNormal').attr('order_id');
|
| 7730 |
anupam.sin |
511 |
convertStoreToNormal(orderId);
|
|
|
512 |
});
|
|
|
513 |
|
| 7645 |
anupam.sin |
514 |
$('#display-store-ret-auth-options').live('click', function() {
|
|
|
515 |
$.colorbox({
|
|
|
516 |
inline : true,
|
|
|
517 |
width : "550px",
|
|
|
518 |
height : "200px",
|
|
|
519 |
href : "div#store-return-auth",
|
|
|
520 |
onClosed : function() {
|
| 12359 |
amit.gupta |
521 |
$('#store-return-form input[name=orderId], #store-return-form input[name=id]').remove();
|
| 7645 |
anupam.sin |
522 |
$("#store-return-auth").hide();
|
|
|
523 |
}
|
|
|
524 |
});
|
|
|
525 |
$("#store-return-form").append("<input type='hidden' name='orderId' value=" + $(this).attr('orderId') + "></input>");
|
| 12359 |
amit.gupta |
526 |
$("#store-return-form").append("<input type='hidden' name='id' value=" + $(this).attr('ticketId') + "></input>");
|
| 7645 |
anupam.sin |
527 |
$("#store-return-auth").show();
|
|
|
528 |
});
|
|
|
529 |
|
|
|
530 |
$('#display-store-doa-auth-options').live('click', function() {
|
|
|
531 |
$.colorbox({
|
|
|
532 |
inline : true,
|
|
|
533 |
width : "550px",
|
|
|
534 |
height : "200px",
|
|
|
535 |
href : "div#store-doa-auth",
|
|
|
536 |
onClosed : function() {
|
| 12359 |
amit.gupta |
537 |
$('#store-doa-form input[name=orderId], #store-doa-form input[name=id]').remove();
|
| 7645 |
anupam.sin |
538 |
$("#store-doa-auth").hide();
|
|
|
539 |
}
|
|
|
540 |
});
|
|
|
541 |
$("#store-doa-form").append("<input type='hidden' name='orderId' value=" + $(this).attr('orderId') + "></input>");
|
| 12359 |
amit.gupta |
542 |
$("#store-doa-form").append("<input type='hidden' name='id' value=" + $(this).attr('ticketId') + "></input>");
|
| 7645 |
anupam.sin |
543 |
$("#store-doa-auth").show();
|
|
|
544 |
});
|
|
|
545 |
|
|
|
546 |
$('#auth-return-button').live('click', function() {
|
|
|
547 |
$.ajax({
|
|
|
548 |
type : "POST",
|
|
|
549 |
url : "/crm/tickets!authorizeReturn",
|
|
|
550 |
data : $('#store-return-form').serialize(),
|
|
|
551 |
success : function(response) {
|
|
|
552 |
$('#bottom-infopane').html(response);
|
|
|
553 |
}
|
|
|
554 |
});
|
|
|
555 |
$.colorbox.close();
|
|
|
556 |
});
|
|
|
557 |
|
|
|
558 |
$('#auth-doa-button').live('click', function() {
|
|
|
559 |
$.ajax({
|
|
|
560 |
type : "POST",
|
|
|
561 |
url : "/crm/tickets!authorizeDOA",
|
|
|
562 |
data : $('#store-doa-form').serialize(),
|
|
|
563 |
success : function(response) {
|
|
|
564 |
$('#bottom-infopane').html(response);
|
|
|
565 |
}
|
|
|
566 |
});
|
|
|
567 |
$.colorbox.close();
|
|
|
568 |
});
|
| 8822 |
manish.sha |
569 |
|
|
|
570 |
|
|
|
571 |
$('#refundPayment').live('click', function() {
|
|
|
572 |
$('#refundPayment').hide();
|
|
|
573 |
$('#refundDetailSubmit').attr('disabled', 'true');
|
|
|
574 |
$('#refundPhysicalOrderForm').slideDown(100);
|
|
|
575 |
});
|
|
|
576 |
|
|
|
577 |
$('#cancelRefundRequest').live('click', function() {
|
|
|
578 |
$('#refundPhysicalOrderForm').slideUp(100, function(){
|
|
|
579 |
$("#rfdCheque").attr("checked", false);
|
|
|
580 |
$("#rfdGateway").attr("checked", false);
|
|
|
581 |
$("#rfdCoupon").attr("checked", false);
|
|
|
582 |
$('div#refundByCoupon').hide();
|
|
|
583 |
$('div#refundByCheque').hide();
|
|
|
584 |
$('div#refundByGateway').hide();
|
|
|
585 |
$('#refundPayment').show();
|
|
|
586 |
$('#couponDetails').val('');
|
|
|
587 |
$('#refundAmountCoupon').val('');
|
|
|
588 |
$('#chequeDetails').val('');
|
|
|
589 |
$('#refundAmountCheque').val('');
|
|
|
590 |
$('#comments').val('');
|
|
|
591 |
$('#refundAmountGateway').val('');
|
|
|
592 |
});
|
|
|
593 |
});
|
|
|
594 |
|
|
|
595 |
$('#refundPhysicalOrderForm').live('submit', function(){
|
| 8898 |
manish.sha |
596 |
var orderAmount = $("input[name='orderAmount']").val();
|
|
|
597 |
var orderAmountFloat = parseFloat(orderAmount);
|
|
|
598 |
var radioBtnValue = $("input[name='rfdRadio']:checked").val();
|
| 8822 |
manish.sha |
599 |
if(radioBtnValue == 'rfdCoupon')
|
|
|
600 |
{
|
|
|
601 |
var couponDeatils = $("input[name='couponDetails']").val();
|
|
|
602 |
var refundAmountCoupon = $("input[name='refundAmountCoupon']").val();
|
| 8898 |
manish.sha |
603 |
var refundAmountCouponFloat = parseFloat(refundAmountCoupon);
|
| 8822 |
manish.sha |
604 |
if(couponDeatils==null || couponDeatils=="")
|
|
|
605 |
{
|
|
|
606 |
alert("Coupon Details are Mandatory. Please fill the Details");
|
|
|
607 |
$('input[name=couponDetails]').focus();
|
|
|
608 |
return false;
|
|
|
609 |
}
|
|
|
610 |
if(refundAmountCoupon==null || refundAmountCoupon=="")
|
|
|
611 |
{
|
|
|
612 |
alert("Refund Amount is Mandatory. Please fill the Amount");
|
|
|
613 |
$('input[name=refundAmountCoupon]').focus();
|
|
|
614 |
return false;
|
|
|
615 |
}
|
| 8898 |
manish.sha |
616 |
if(refundAmountCouponFloat > orderAmountFloat){
|
|
|
617 |
var didConfirm = confirm("Refund Amount is Greater Than Order Total Amount.\nAre you still want to Proceed");
|
|
|
618 |
if(didConfirm==false){
|
|
|
619 |
return false;
|
|
|
620 |
}
|
|
|
621 |
}
|
| 8822 |
manish.sha |
622 |
}
|
|
|
623 |
if(radioBtnValue == 'rfdCheque')
|
|
|
624 |
{
|
|
|
625 |
var chequeDetails = $("input[name='chequeDetails']").val();
|
|
|
626 |
var refundAmountCheque = $("input[name='refundAmountCheque']").val();
|
|
|
627 |
if(chequeDetails==null || chequeDetails=="")
|
|
|
628 |
{
|
|
|
629 |
alert("Cheque Details are Mandatory. Please fill the Details");
|
|
|
630 |
$('input[name=chequeDetails]').focus();
|
|
|
631 |
return false;
|
|
|
632 |
}
|
|
|
633 |
if(refundAmountCheque==null || refundAmountCheque=="")
|
|
|
634 |
{
|
|
|
635 |
alert("Refund Amount is Mandatory. Please fill the Amount");
|
|
|
636 |
$('input[name=refundAmountCheque]').focus();
|
|
|
637 |
return false;
|
|
|
638 |
}
|
|
|
639 |
}
|
|
|
640 |
if(radioBtnValue == 'rfdGateway')
|
|
|
641 |
{
|
|
|
642 |
var comments = $("input[name='comments']").val();
|
|
|
643 |
var refundAmountGateway = $("input[name='refundAmountGateway']").val();
|
| 8898 |
manish.sha |
644 |
var refundAmountGatewayFloat = parseFloat(refundAmountGateway);
|
| 8822 |
manish.sha |
645 |
if(comments==null || comments=="")
|
|
|
646 |
{
|
|
|
647 |
alert("Comments Mandatory. Please fill the Details");
|
|
|
648 |
$('input[name=comments]').focus();
|
|
|
649 |
return false;
|
|
|
650 |
}
|
|
|
651 |
if(refundAmountGateway==null || refundAmountGateway=="")
|
|
|
652 |
{
|
|
|
653 |
alert("Refund Amount is Mandatory. Please fill the Amount");
|
|
|
654 |
$('input[name=refundAmountGateway]').focus();
|
|
|
655 |
return false;
|
|
|
656 |
}
|
| 8898 |
manish.sha |
657 |
if(refundAmountGatewayFloat > orderAmountFloat){
|
|
|
658 |
var didConfirm = confirm("Refund Amount is Greater Than Order Total Amount.\nAre you still want to Proceed");
|
|
|
659 |
if(didConfirm==false){
|
|
|
660 |
return false;
|
|
|
661 |
}
|
|
|
662 |
}
|
| 8822 |
manish.sha |
663 |
}
|
|
|
664 |
refundOrderPayment($(this).serialize());
|
|
|
665 |
return false;
|
|
|
666 |
});
|
|
|
667 |
|
|
|
668 |
$('#rfdCoupon').live('click', function() {
|
|
|
669 |
$('div#refundByCoupon').show();
|
|
|
670 |
$('div#refundByCheque').hide();
|
|
|
671 |
$('div#refundByGateway').hide();
|
|
|
672 |
$('#refundDetailSubmit').removeAttr('disabled');
|
|
|
673 |
|
|
|
674 |
});
|
|
|
675 |
$('#rfdGateway').live('click', function() {
|
|
|
676 |
$('div#refundByCoupon').hide();
|
|
|
677 |
$('div#refundByCheque').hide();
|
|
|
678 |
$('div#refundByGateway').show();
|
|
|
679 |
$('#refundDetailSubmit').removeAttr('disabled');
|
|
|
680 |
|
|
|
681 |
});
|
|
|
682 |
$('#rfdCheque').live('click', function() {
|
|
|
683 |
$('div#refundByCoupon').hide();
|
|
|
684 |
$('div#refundByCheque').show();
|
|
|
685 |
$('div#refundByGateway').hide();
|
|
|
686 |
$('#refundDetailSubmit').removeAttr('disabled');
|
|
|
687 |
|
|
|
688 |
});
|
|
|
689 |
|
| 19072 |
manish.sha |
690 |
/*
|
|
|
691 |
$('input#returnTxnRadio').live('click', function() {
|
|
|
692 |
$('div#returnPkupInput').hide();
|
|
|
693 |
$('div#returnTxnInput').show();
|
|
|
694 |
});
|
|
|
695 |
|
|
|
696 |
$('input#returnPkupRadio').live('click', function() {
|
|
|
697 |
$('div#returnPkupInput').show();
|
|
|
698 |
$('div#returnTxnInput').hide();
|
|
|
699 |
});*/
|
| 8822 |
manish.sha |
700 |
|
|
|
701 |
|
| 7372 |
kshitij.so |
702 |
});
|