Subversion Repositories SmartDukaan

Rev

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

Rev 7393 Rev 7399
Line 122... Line 122...
122
                return false;
122
                return false;
123
            });
123
            });
124
    
124
    
125
    $('form#cancel-form').live('submit',
125
    $('form#cancel-form').live('submit',
126
    		function() {
126
    		function() {
127
    	if( $('#cancel-form.cancelReasonBox').attr('style') && !($('#cancel-form.cancelReasonBox').attr('style').indexOf('none'))) {
127
    	if( $('#cancelReasonBox').attr('style') && !($('#cancelReasonBox').attr('style').indexOf('none'))) {
128
    	var body = $('#cancel-form.cancel-body').val().trim();
128
    	var body = $('#cancel-body').val().trim();
129
    	if (body == null || body == '') {
129
    	if (body == null || body == '') {
130
    		alert('Please specify description');
130
    		alert('Please specify description');
131
    		return false;
131
    		return false;
132
    	}
132
    	}
133
    }
133
    }
Line 139... Line 139...
139
    return false;
139
    return false;
140
	});
140
	});
141
    
141
    
142
    $('#cancel-store-order-form').live('submit',
142
    $('#cancel-store-order-form').live('submit',
143
    		function() {
143
    		function() {
144
    	if( $('#cancel-store-order-form.cancelReasonBox').attr('style') && !($('#cancel-store-order-form.cancelReasonBox').attr('style').indexOf('none'))) {
144
    	if( $('#cancelReasonBox').attr('style') && !($('#cancelReasonBox').attr('style').indexOf('none'))) {
145
    	var body = $('#cancel-store-order-form.cancel-body').val().trim();
145
    	var body = $('#cancel-body').val().trim();
146
    	if (body == null || body == '') {
146
    	if (body == null || body == '') {
147
    		alert('Please specify description');
147
    		alert('Please specify description');
148
    		return false;
148
    		return false;
149
    	}
149
    	}
150
    }
150
    }
Line 154... Line 154...
154
    cancelStoreOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
154
    cancelStoreOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
155
    $.colorbox.close();
155
    $.colorbox.close();
156
    return false;
156
    return false;
157
	});
157
	});
158
 
158
 
159
    $('form#cancel-form-limited').live('submit',
-
 
160
    		function() {
-
 
161
    	if( $('#cancel-form-limited.cancelReasonBox').attr('style') && !($('#cancel-form-limited.cancelReasonBox').attr('style').indexOf('none'))) {
-
 
162
    	var body = $('#cancel-form-limited.cancel-body').val().trim();
-
 
163
    	if (body == null || body == '') {
-
 
164
    		alert('Please specify description');
-
 
165
    		return false;
-
 
166
    	}
-
 
167
    }
-
 
168
    var ticketId = $('.display-limited-cancel-order-popup').attr('ticketId');
-
 
169
    var orderId = $('.display-limited-cancel-order-popup').attr('orderId');
-
 
170
    var orderStatus = $('.display-limited-cancel-order-popup').attr('orderStatus');
-
 
171
    cancelOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
-
 
172
    $.colorbox.close();
-
 
173
    return false;
-
 
174
	});
-
 
175
 
-
 
176
    
-
 
177
    $('form#activity-mail-form').live(
159
    $('form#activity-mail-form').live(
178
            'submit',
160
            'submit',
179
            function() {
161
            function() {
180
                createActivity("infopane", $(this).serialize() + '&' + $("#create-activity-form").serialize());
162
                createActivity("infopane", $(this).serialize() + '&' + $("#create-activity-form").serialize());
181
                $.colorbox.close();
163
                $.colorbox.close();
Line 357... Line 339...
357
 
339
 
358
    $('form.change-address').live('submit', function() {
340
    $('form.change-address').live('submit', function() {
359
        changeAddress($(this).serialize());
341
        changeAddress($(this).serialize());
360
    });
342
    });
361
    
343
    
362
    $('.display-limited-cancel-order-popup').live('click', function(){
-
 
363
        displayLimitedCancelOrderPopUp();
-
 
364
    });
-
 
365
    
-
 
366
    $('.display-cancel-order-popup').live('click', function(){
344
    $('.display-cancel-order-popup').live('click', function(){
367
        displayCancelOrderPopUp();
345
        displayCancelOrderPopUp();
368
    });
346
    });
369
    
347
    
370
    $('.display-cancel-store-order-popup').live('click', function(){
348
    $('.display-cancel-store-order-popup').live('click', function(){
Line 449... Line 427...
449
    
427
    
450
    $('#submitNewAddress').live('click', function(){
428
    $('#submitNewAddress').live('click', function(){
451
    	var orderId = $(this).attr('orderId');
429
    	var orderId = $(this).attr('orderId');
452
    	changeShippingAddress(orderId);
430
    	changeShippingAddress(orderId);
453
    });
431
    });
454
    
-
 
455
    $("select#cancellationInitiator").live('change', function(){
-
 
456
    	    var selectVal = $('#cancellationInitiator :selected').val();
-
 
457
    	    if (selectVal == "INTERNAL"){
-
 
458
    	    	$( "#orderCancellationButton" ).removeClass('display-cancel-order-popup');
-
 
459
    	    	$( "#orderCancellationButton" ).addClass('display-limited-cancel-order-popup');
-
 
460
    	    	return false;
-
 
461
    	    }
-
 
462
    	    else {
-
 
463
    	    	$( "#orderCancellationButton" ).removeClass('display-limited-cancel-order-popup');
-
 
464
    	    	$( "#orderCancellationButton" ).addClass('display-cancel-order-popup');
-
 
465
    	    	return false;
-
 
466
    	    }
-
 
467
     	});
-
 
468
});
432
});