Subversion Repositories SmartDukaan

Rev

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

Rev 6985 Rev 7372
Line 137... Line 137...
137
    cancelOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
137
    cancelOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
138
    $.colorbox.close();
138
    $.colorbox.close();
139
    return false;
139
    return false;
140
	});
140
	});
141
 
141
 
-
 
142
    $('form#cancel-form-limited').live('submit',
-
 
143
    		function() {
-
 
144
    	if( $('#cancelReasonBox').attr('style') && !($('#cancelReasonBox').attr('style').indexOf('none'))) {
-
 
145
    	var body = $('#cancel-body').val().trim();
-
 
146
    	if (body == null || body == '') {
-
 
147
    		alert('Please specify description');
-
 
148
    		return false;
-
 
149
    	}
-
 
150
    }
-
 
151
    var ticketId = $('.display-limited-cancel-order-popup').attr('ticketId');
-
 
152
    var orderId = $('.display-limited-cancel-order-popup').attr('orderId');
-
 
153
    var orderStatus = $('.display-limited-cancel-order-popup').attr('orderStatus');
-
 
154
    cancelOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
-
 
155
    $.colorbox.close();
-
 
156
    return false;
-
 
157
	});
-
 
158
 
-
 
159
    
142
    $('form#activity-mail-form').live(
160
    $('form#activity-mail-form').live(
143
            'submit',
161
            'submit',
144
            function() {
162
            function() {
145
                createActivity("infopane", $(this).serialize() + '&' + $("#create-activity-form").serialize());
163
                createActivity("infopane", $(this).serialize() + '&' + $("#create-activity-form").serialize());
146
                $.colorbox.close();
164
                $.colorbox.close();
Line 285... Line 303...
285
    $('.return-request-tickets').live('click', function() {
303
    $('.return-request-tickets').live('click', function() {
286
        loadTickets('infopane', "/crm/tickets!searchTickets?category=RETURN_FORM&status=OPEN");        
304
        loadTickets('infopane', "/crm/tickets!searchTickets?category=RETURN_FORM&status=OPEN");        
287
        return false;
305
        return false;
288
    });
306
    });
289
    
307
    
-
 
308
    $('.low-inventory-tickets').live('click', function() {
-
 
309
        loadTickets('infopane', "/crm/tickets!searchTickets?category=LOW_INVENTORY_CANCELLED_ORDERS&status=OPEN");        
-
 
310
        return false;
-
 
311
    });
-
 
312
    
290
    $('#order-cancellation-tickets').live('click', function() {
313
    $('#order-cancellation-tickets').live('click', function() {
291
        loadTickets('infopane', "/crm/tickets!searchTickets?category=ORDER_CANCELLATION&status=OPEN");        
314
        loadTickets('infopane', "/crm/tickets!searchTickets?category=ORDER_CANCELLATION&status=OPEN");        
292
        return false;
315
        return false;
293
    });
316
    });
294
 
317
 
Line 308... Line 331...
308
    
331
    
309
    $('.update-order-status').live('click', function() {
332
    $('.update-order-status').live('click', function() {
310
        updateOrderStatus('bottom-infopane', $(this).attr('ticketId'), $(this).attr('orderId'), $(this).attr('orderStatus'));
333
        updateOrderStatus('bottom-infopane', $(this).attr('ticketId'), $(this).attr('orderId'), $(this).attr('orderStatus'));
311
    });
334
    });
312
    
335
    
313
    $('.display-cancel-order-popup').live('click', function() {
-
 
314
    	displayCancelOrderPopUp();
-
 
315
    });
-
 
316
 
336
 
317
    $('.list-my-unread-activity').live('click', function() {
337
    $('.list-my-unread-activity').live('click', function() {
318
        loadUnreadActivities('infopane');
338
        loadUnreadActivities('infopane');
319
    });
339
    });
320
 
340
 
321
    $('form.change-address').live('submit', function() {
341
    $('form.change-address').live('submit', function() {
322
        changeAddress($(this).serialize());
342
        changeAddress($(this).serialize());
323
    });
343
    });
324
    
344
    
-
 
345
    $('.display-limited-cancel-order-popup').live('click', function(){
-
 
346
        displayLimitedCancelOrderPopUp();
-
 
347
    });
-
 
348
    
325
    $('#orderCancellationButton').live('click', function(){
349
    $('.display-cancel-order-popup').live('click', function(){
326
        displayCancelOrderPopUp();
350
        displayCancelOrderPopUp();
327
    });
351
    });
328
    
352
    
329
    $('input.cancelReason').live('change', function(){
353
    $('input.cancelReason').live('change', function(){
330
    	showHidecancelReasonDiv($(this).attr('id'));
354
    	showHidecancelReasonDiv($(this).attr('id'));
Line 404... Line 428...
404
    
428
    
405
    $('#submitNewAddress').live('click', function(){
429
    $('#submitNewAddress').live('click', function(){
406
    	var orderId = $(this).attr('orderId');
430
    	var orderId = $(this).attr('orderId');
407
    	changeShippingAddress(orderId);
431
    	changeShippingAddress(orderId);
408
    });
432
    });
409
});
-
 
410
433
    
-
 
434
    $("select#cancellationInitiator").live('change', function(){
-
 
435
    	    var selectVal = $('#cancellationInitiator :selected').val();
-
 
436
    	    if (selectVal == "INTERNAL"){
-
 
437
    	    	$( "#orderCancellationButton" ).removeClass('display-cancel-order-popup');
-
 
438
    	    	$( "#orderCancellationButton" ).addClass('display-limited-cancel-order-popup');
-
 
439
    	    	return false;
-
 
440
    	    }
-
 
441
    	    else {
-
 
442
    	    	$( "#orderCancellationButton" ).removeClass('display-limited-cancel-order-popup');
-
 
443
    	    	$( "#orderCancellationButton" ).addClass('display-cancel-order-popup');
-
 
444
    	    	return false;
-
 
445
    	    }
-
 
446
     	});
-
 
447
});
-
 
448