| 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 |
});
|
| 3090 |
mandeep.dh |
11 |
|
| 3228 |
mandeep.dh |
12 |
$("a.show-orders").live('click', function() {
|
|
|
13 |
var userId = $(this).attr('userId');
|
|
|
14 |
loadOrderPane("infopane", userId, 0);
|
|
|
15 |
});
|
| 3090 |
mandeep.dh |
16 |
|
| 3228 |
mandeep.dh |
17 |
$("a.show-cart").live('click', function() {
|
|
|
18 |
var userId = $(this).attr('userId');
|
|
|
19 |
var cartId = $(this).attr('cartId');
|
|
|
20 |
loadCartPane("infopane", userId, cartId);
|
|
|
21 |
});
|
| 3090 |
mandeep.dh |
22 |
|
| 3228 |
mandeep.dh |
23 |
$("a.show-user-communication").live('click', function() {
|
|
|
24 |
var userId = $(this).attr('userId');
|
|
|
25 |
loadUserCommunicationPane("infopane", userId);
|
|
|
26 |
});
|
| 3090 |
mandeep.dh |
27 |
|
| 3228 |
mandeep.dh |
28 |
$("a.show-line-details").live('click', function() {
|
|
|
29 |
var userId = $(this).attr('userId');
|
|
|
30 |
var itemId = $(this).attr('itemId');
|
|
|
31 |
loadLineInfo("bottom-infopane", userId, itemId);
|
|
|
32 |
});
|
| 3090 |
mandeep.dh |
33 |
|
| 3228 |
mandeep.dh |
34 |
$("a.show-comm-details").live('click', function() {
|
|
|
35 |
var userId = $(this).attr('userId');
|
|
|
36 |
var commId = $(this).attr('commId');
|
|
|
37 |
loadCommunicationInfo("bottom-infopane", userId, commId);
|
|
|
38 |
});
|
| 3090 |
mandeep.dh |
39 |
|
| 3228 |
mandeep.dh |
40 |
$("a.show-tickets").live('click', function() {
|
|
|
41 |
var userId = $(this).attr('userId');
|
| 3405 |
mandeep.dh |
42 |
loadTickets('infopane', "/crm/tickets!searchTickets?userId=" + userId);
|
| 3228 |
mandeep.dh |
43 |
});
|
| 3090 |
mandeep.dh |
44 |
|
| 3228 |
mandeep.dh |
45 |
$("a.show-activity").live('click', function() {
|
|
|
46 |
var userId = $(this).attr('userId');
|
| 3405 |
mandeep.dh |
47 |
listActivities('infopane', "userId=" + userId);
|
| 3228 |
mandeep.dh |
48 |
});
|
| 3090 |
mandeep.dh |
49 |
|
| 3228 |
mandeep.dh |
50 |
$("a.show-ticket-details").live('click', function() {
|
|
|
51 |
var ticketId = $(this).attr('ticketId');
|
| 3405 |
mandeep.dh |
52 |
|
| 3228 |
mandeep.dh |
53 |
// will be set when ticket Id link is clicked from activity page
|
|
|
54 |
var activityId = $(this).attr('activityId');
|
|
|
55 |
loadTicketInfo("bottom-infopane", ticketId, null, activityId);
|
|
|
56 |
});
|
| 3090 |
mandeep.dh |
57 |
|
| 3228 |
mandeep.dh |
58 |
$("a.show-activity-details").live('click', function() {
|
|
|
59 |
var activityId = $(this).attr('activityId');
|
| 3422 |
mandeep.dh |
60 |
loadActivityInfo("bottom-infopane", activityId);
|
| 3228 |
mandeep.dh |
61 |
});
|
| 3090 |
mandeep.dh |
62 |
|
| 3228 |
mandeep.dh |
63 |
$("a.create-ticket").live('click', function() {
|
| 3405 |
mandeep.dh |
64 |
var userId = $(this).attr('userId');
|
|
|
65 |
|
|
|
66 |
var params = null;
|
|
|
67 |
if (userId != null && userId != "") {
|
|
|
68 |
params = "userId=" + userId;
|
|
|
69 |
}
|
|
|
70 |
|
|
|
71 |
loadTicketCreationForm("infopane", params);
|
| 3228 |
mandeep.dh |
72 |
});
|
| 3206 |
mandeep.dh |
73 |
|
| 3228 |
mandeep.dh |
74 |
$("a.create-activity").live('click', function() {
|
|
|
75 |
var userId = $(this).attr('userId');
|
| 3090 |
mandeep.dh |
76 |
|
| 3405 |
mandeep.dh |
77 |
var params = null;
|
|
|
78 |
if (userId != null && userId != "") {
|
|
|
79 |
params = "userId=" + userId;
|
|
|
80 |
}
|
|
|
81 |
|
|
|
82 |
loadActivityCreationForm("infopane", params);
|
| 3339 |
mandeep.dh |
83 |
});
|
|
|
84 |
|
| 3228 |
mandeep.dh |
85 |
$('#update-ticket-form').live('submit', function() {
|
|
|
86 |
var ticketId = $(this).attr('ticketId');
|
|
|
87 |
updateTicket("infopane", ticketId, $(this).serialize());
|
|
|
88 |
return false;
|
|
|
89 |
});
|
| 3206 |
mandeep.dh |
90 |
|
| 3228 |
mandeep.dh |
91 |
$('form#mail-form').live(
|
|
|
92 |
'submit',
|
|
|
93 |
function() {
|
|
|
94 |
var ticketId = $('#update-ticket-form').attr('ticketId');
|
|
|
95 |
updateTicket("infopane", ticketId, $(this).serialize() + '&'
|
|
|
96 |
+ $('#update-ticket-form').serialize());
|
|
|
97 |
$.colorbox.close();
|
|
|
98 |
return false;
|
|
|
99 |
});
|
| 3106 |
mandeep.dh |
100 |
|
| 4020 |
mandeep.dh |
101 |
$('form#escalation-form').live(
|
|
|
102 |
'submit',
|
|
|
103 |
function() {
|
|
|
104 |
var ticketId = $('#update-ticket-form').attr('ticketId');
|
|
|
105 |
updateTicket("infopane", ticketId, $(this).serialize() + '&'
|
|
|
106 |
+ $('#update-ticket-form').serialize());
|
|
|
107 |
$.colorbox.close();
|
|
|
108 |
return false;
|
|
|
109 |
});
|
|
|
110 |
|
| 3228 |
mandeep.dh |
111 |
$('form#activity-mail-form').live(
|
|
|
112 |
'submit',
|
|
|
113 |
function() {
|
|
|
114 |
createActivity("infopane", $(this).serialize() + '&' + $("#create-activity-form").serialize());
|
|
|
115 |
$.colorbox.close();
|
|
|
116 |
return false;
|
|
|
117 |
});
|
| 3106 |
mandeep.dh |
118 |
|
| 3405 |
mandeep.dh |
119 |
$('#create-activity-form').live('submit', function() {
|
|
|
120 |
createActivity("infopane", $(this).serialize());
|
| 3339 |
mandeep.dh |
121 |
return false;
|
|
|
122 |
});
|
|
|
123 |
|
| 3228 |
mandeep.dh |
124 |
$('#create-ticket-form').live('submit', function() {
|
|
|
125 |
createTicket("infopane", $(this).serialize());
|
|
|
126 |
return false;
|
|
|
127 |
});
|
| 3106 |
mandeep.dh |
128 |
|
| 3228 |
mandeep.dh |
129 |
$(".home-page").click(function() {
|
|
|
130 |
goToHomePage();
|
|
|
131 |
});
|
| 3106 |
mandeep.dh |
132 |
|
| 3228 |
mandeep.dh |
133 |
$(".my-open-tickets").live('click', function() {
|
| 4008 |
mandeep.dh |
134 |
loadTickets('infopane', "/crm/tickets!searchTickets?agentIds=" + $(this).attr('agentIds') +"&status=OPEN");
|
| 3228 |
mandeep.dh |
135 |
});
|
| 3151 |
mandeep.dh |
136 |
|
| 3228 |
mandeep.dh |
137 |
$(".unassigned-tickets").live('click', function() {
|
| 3234 |
mandeep.dh |
138 |
loadTickets('infopane', "/crm/tickets!getUnassignedTickets");
|
| 3151 |
mandeep.dh |
139 |
});
|
|
|
140 |
|
| 3228 |
mandeep.dh |
141 |
$("form").ajaxSend(function(evt, request, settings) {
|
|
|
142 |
$("#spinner-div").show();
|
|
|
143 |
});
|
|
|
144 |
|
|
|
145 |
$("form").ajaxComplete(function(evt, request, settings) {
|
|
|
146 |
$("#spinner-div").hide();
|
|
|
147 |
});
|
|
|
148 |
|
|
|
149 |
$("a").ajaxSend(function(evt, request, settings) {
|
|
|
150 |
$("#spinner-div").show();
|
|
|
151 |
});
|
|
|
152 |
|
|
|
153 |
$("a").ajaxComplete(function(evt, request, settings) {
|
|
|
154 |
$("#spinner-div").hide();
|
|
|
155 |
});
|
|
|
156 |
|
|
|
157 |
$("select#activity-type").live('change', function() {
|
| 3422 |
mandeep.dh |
158 |
processActivityTypeChange($(this).val());
|
| 3228 |
mandeep.dh |
159 |
});
|
| 3397 |
mandeep.dh |
160 |
|
| 3339 |
mandeep.dh |
161 |
$(".list-my-activity").live('click', function() {
|
|
|
162 |
listActivities('infopane', "");
|
|
|
163 |
});
|
|
|
164 |
|
|
|
165 |
$(".list-customer-activity").live('click', function() {
|
|
|
166 |
listActivities('infopane', "creatorId=1");
|
|
|
167 |
});
|
| 3390 |
mandeep.dh |
168 |
|
|
|
169 |
$("#mark-as-read").live('click', function() {
|
|
|
170 |
var activityId = $(this).attr('activityId');
|
|
|
171 |
markAsRead(activityId);
|
|
|
172 |
});
|
| 3397 |
mandeep.dh |
173 |
|
|
|
174 |
$("form#search").live('submit', function() {
|
|
|
175 |
if ($('#searchEntity').val() == 'Tickets') {
|
|
|
176 |
loadTickets('infopane', "/crm/tickets!searchTickets?" + $(this).serialize());
|
|
|
177 |
}
|
|
|
178 |
else {
|
|
|
179 |
listActivities('infopane', $(this).serialize());
|
|
|
180 |
}
|
|
|
181 |
|
|
|
182 |
$.colorbox.close();
|
|
|
183 |
return false;
|
|
|
184 |
});
|
|
|
185 |
|
|
|
186 |
$(".advanced-search").live('click', function() {
|
|
|
187 |
loadAdvancedSearchBox();
|
|
|
188 |
return false;
|
|
|
189 |
});
|
|
|
190 |
|
|
|
191 |
$("select#searchEntity").live('change', function() {
|
|
|
192 |
var searchEntity = $(this).val();
|
|
|
193 |
processSearchEntityChange(searchEntity);
|
|
|
194 |
});
|
| 3499 |
mandeep.dh |
195 |
|
|
|
196 |
$('.pending-cod-verification-tickets').live('click', function() {
|
| 3546 |
mandeep.dh |
197 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=COD_VERIFICATION&status=OPEN");
|
|
|
198 |
return false;
|
| 3499 |
mandeep.dh |
199 |
});
|
| 3546 |
mandeep.dh |
200 |
|
| 3578 |
mandeep.dh |
201 |
$('.open-failed-payments-tickets').live('click', function() {
|
|
|
202 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=FAILED_PAYMENTS&status=OPEN");
|
|
|
203 |
return false;
|
|
|
204 |
});
|
|
|
205 |
|
| 4008 |
mandeep.dh |
206 |
$('.open-delayed-delivery-tickets').live('click', function() {
|
|
|
207 |
loadTickets('infopane', "/crm/tickets!searchTickets?category=DELAYED_DELIVERY&status=OPEN");
|
|
|
208 |
return false;
|
|
|
209 |
});
|
|
|
210 |
|
| 3499 |
mandeep.dh |
211 |
$('.trust-level-increase').live('click', function() {
|
|
|
212 |
increaseTrustLevel('infopane', $('input#trust-level-increase').attr('userId'), $('input#trust-level-increase').val());
|
|
|
213 |
});
|
|
|
214 |
|
| 3546 |
mandeep.dh |
215 |
$('.update-order-status').live('click', function() {
|
|
|
216 |
updateOrderStatus('bottom-infopane', $(this).attr('ticketId'), $(this).attr('orderId'), $(this).attr('orderStatus'));
|
| 3499 |
mandeep.dh |
217 |
});
|
| 3711 |
mandeep.dh |
218 |
|
|
|
219 |
$('.list-my-unread-activity').live('click', function() {
|
|
|
220 |
loadUnreadActivities('infopane');
|
|
|
221 |
});
|
| 2674 |
vikas |
222 |
});
|