Subversion Repositories SmartDukaan

Rev

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

Rev 19083 Rev 20021
Line -... Line 1...
-
 
1
    var CRMNameSpace = CRMNameSpace || {};
-
 
2
 
1
$(function() {
3
$(function() {
2
    $("a.show-order-details").live('click', function() {
4
    $("a.show-order-details").live('click', function() {
3
        var orderId = $(this).attr('orderId');
5
        var orderId = $(this).attr('orderId');
4
        loadOrderInfo("bottom-infopane", orderId);
6
        loadOrderInfo("bottom-infopane", orderId);
5
    });
7
    });
Line 134... Line 136...
134
    	if (body == null || body == '') {
136
    	if (body == null || body == '') {
135
    		alert('Please specify description');
137
    		alert('Please specify description');
136
    		return false;
138
    		return false;
137
    	}
139
    	}
138
    }
140
    }
139
    	
141
    var clicked = CRMNameSpace.CancelObj;
140
    var canceltype = $("div#cancel-div").attr('cancelType');
142
    var canceltype = $("div#cancel-div").attr('cancelType');
141
    var ticketId = $('.display-cancel-order-popup').attr('ticketId');
143
    var ticketId = $(clicked).attr('ticketId');
142
    var orderStatus = $('.display-cancel-order-popup').attr('orderStatus');
144
    var orderStatus =  $(clicked).attr('orderStatus');
-
 
145
    var transactionId = $(clicked).attr('transactionId');
-
 
146
    var orderId = $(clicked).attr('orderId');
143
    if(canceltype=='txn'){
147
  //  if(canceltype=='txn'){
144
    	var transactionId = $('.display-cancel-order-popup').attr('transactionId');
148
    if(orderId==undefined||orderId==''){
145
    	cancelTxn("bottom-infopane", ticketId, transactionId, orderStatus, $(this).serialize());
149
    	cancelTxn("bottom-infopane", ticketId, transactionId, orderStatus, $(this).serialize());
146
    }
150
    }
147
    else{
151
    else{
148
    	var orderId = $('.display-cancel-order-popup').attr('orderId');
-
 
-
 
152
    	
149
    	cancelOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
153
    	cancelOrder("bottom-infopane", ticketId, orderId, orderStatus, $(this).serialize());
150
    }
154
    }
151
    $.colorbox.close();
155
    $.colorbox.close();
152
    return false;
156
    return false;
153
	});
157
	});
Line 405... Line 409...
405
 
409
 
406
    $('form.change-address').live('submit', function() {
410
    $('form.change-address').live('submit', function() {
407
        changeAddress($(this).serialize());
411
        changeAddress($(this).serialize());
408
    });
412
    });
409
    
413
    
-
 
414
 
-
 
415
    
-
 
416
    
410
    $('.display-cancel-order-popup').live('click', function(){
417
    $('.display-cancel-order-popup').live('click', function(){
-
 
418
    	CRMNameSpace.CancelObj= this;
411
    	var orderId = $('.display-cancel-order-popup').attr('orderId');
419
    	var orderId = $(this).attr('orderid');
412
    	if(orderId==undefined){
420
    	if(orderId==undefined){
413
    		var transactionId = $('.display-cancel-order-popup').attr('transactionId');
-
 
414
    		displayCancelOrderPopUp("txn");
421
    		displayCancelOrderPopUp("txn");
415
    	}else{
422
    	}else{
416
    		displayCancelOrderPopUp("order");
423
    		displayCancelOrderPopUp("order");
417
    	}
424
    	}
418
    });
425
    });