Subversion Repositories SmartDukaan

Rev

Rev 3168 | Rev 3228 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2674 vikas 1
$(function() {
2
	$("a.show-order-details").live('click', function() {
3
		var orderId = $(this).attr('orderId');
4
		var userId = $(this).attr('userId');
5
		loadOrderInfo("bottom-infopane", userId, orderId);
6
	});
3206 mandeep.dh 7
 
2674 vikas 8
	$("a.show-user-details").live('click', function() {
9
		var userId = $(this).attr('userId');
10
		loadUserPane("infopane", userId);
11
	});
12
 
13
	$("a.show-orders").live('click', function() {
14
		var userId = $(this).attr('userId');
15
		loadOrderPane("infopane", userId, 0);
16
	});
2714 vikas 17
 
18
	$("a.show-cart").live('click', function() {
19
		var userId = $(this).attr('userId');
20
		var cartId = $(this).attr('cartId');
21
		loadCartPane("infopane", userId, cartId);
22
	});
23
 
2830 vikas 24
	$("a.show-user-communication").live('click', function() {
25
		var userId = $(this).attr('userId');
26
		loadUserCommunicationPane("infopane", userId);
27
	});
3090 mandeep.dh 28
 
2714 vikas 29
	$("a.show-line-details").live('click', function() {
30
		var userId = $(this).attr('userId');
31
		var itemId = $(this).attr('itemId');
32
		loadLineInfo("bottom-infopane", userId, itemId);
33
	});
3090 mandeep.dh 34
 
2830 vikas 35
	$("a.show-comm-details").live('click', function() {
36
		var userId = $(this).attr('userId');
37
		var commId = $(this).attr('commId');
38
		loadCommunicationInfo("bottom-infopane", userId, commId);
39
	});
3090 mandeep.dh 40
 
41
	$("a.show-tickets").live('click', function() {
42
		var userId = $(this).attr('userId');
3096 mandeep.dh 43
		loadTicketPane("infopane", userId, 0);
3090 mandeep.dh 44
	});
45
 
46
	$("a.show-activity").live('click', function() {
47
		var userId = $(this).attr('userId');
48
		loadActivityPane("infopane", userId);
49
	});
50
 
51
	$("a.show-ticket-details").live('click', function() {		
52
		var ticketId = $(this).attr('ticketId');
3206 mandeep.dh 53
		loadTicketInfo("bottom-infopane", ticketId, null);
3090 mandeep.dh 54
	});
55
 
56
	$("a.show-activity-details").live('click', function() {
57
		var activityId = $(this).attr('activityId');
58
		var userId = $(this).attr('userId');
59
		loadActivityInfo("bottom-infopane", userId, activityId);
60
	});
61
 
62
	$("a.create-ticket").live('click', function() {
63
		var userId = $(this).attr('userId');
64
		loadTicketCreationForm("infopane", userId);
65
	});
66
 
67
	$("a.create-activity").live('click', function() {
68
		var userId   = $(this).attr('userId');
69
		loadActivityCreationForm("infopane", userId);
70
	});
71
 
72
	$('#update-ticket-form').live('submit', function() {
73
		var ticketId = $(this).attr('ticketId');
74
		updateTicket("infopane", ticketId, $(this).serialize());
75
		return false;
76
	});
77
 
3206 mandeep.dh 78
	$('form#mail-form').live('submit', function() {
79
		var ticketId = $('#update-ticket-form').attr('ticketId');
80
		updateTicket("infopane", ticketId, $(this).serialize() + '&' + $('#update-ticket-form').serialize());
81
		$.colorbox.close();
82
		return false;
83
	});
84
 
3090 mandeep.dh 85
	$('#create-ticket-form').live('submit', function() {
86
		createTicket("infopane", $(this).serialize());
87
		return false;
88
	});
89
 
90
	$('#create-activity-form').live('submit', function() {
91
		createActivity("infopane", $(this).serialize());
92
		return false;
93
	});
3206 mandeep.dh 94
 
3106 mandeep.dh 95
	$(".home-page").click(function() {
96
		goToHomePage();
97
	});
98
 
99
	$(".my-open-tickets").live('click', function() {
100
		loadMyOpenTickets('infopane');
101
	});
102
 
103
	$(".my-tickets").live('click', function() {
104
		loadMyTickets('infopane');
105
	});
106
 
107
	$(".unassigned-tickets").live('click', function() {
108
		loadUnassignedTickets('infopane');
109
	});
110
 
111
	$(".all-open-tickets").live('click', function() {
112
		loadAllOpenTickets('infopane');
113
	});
114
 
115
	$(".all-tickets").live('click', function() {
116
		loadAllTickets('infopane');
117
	});
3151 mandeep.dh 118
 
119
	$("form").ajaxSend( function(evt, request, settings) {
120
		$("#spinner-div").show();
121
    });
122
 
123
	$("form").ajaxComplete( function(evt, request, settings) {
124
		$("#spinner-div").hide();
125
    });
126
 
127
	$("a").ajaxSend( function(evt, request, settings) {
128
		$("#spinner-div").show();
129
    });
130
 
131
	$("a").ajaxComplete( function(evt, request, settings) {
132
		$("#spinner-div").hide();
133
    });
3206 mandeep.dh 134
 
135
	$("select#activity-type").live('change', function() {
136
		var userId = $(this).attr('userId');
137
		processActivityTypeChange(userId, $(this).val());
138
	});
2674 vikas 139
});