Subversion Repositories SmartDukaan

Rev

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

Rev 23966 Rev 23968
Line 73... Line 73...
73
	
73
	
74
	$('.mk_process_price_drop').live('click', function (){
74
	$('.mk_process_price_drop').live('click', function (){
75
		if (confirm("Are you sure you want to Process price Drop?")) {
75
		if (confirm("Are you sure you want to Process price Drop?")) {
76
			var trElement=$(this).closest('tr');
76
			var trElement=$(this).closest('tr');
77
			var priceDropId = trElement.data('pricedropid');
77
			var priceDropId = trElement.data('pricedropid');
78
			var partnerPayout = trElement.find('partner-payout');
78
			var partnerPayout = trElement.find('.partner-payout').val();
79
			var priceDropIn = trElement.find('price-drop-in');
79
			var priceDropIn = trElement.find('.price-drop-in').val();
80
	
80
	
81
			if(isNaN(partnerPayout) || partnerPayout == 0) {
81
			if(isNaN(partnerPayout) || partnerPayout == 0) {
82
				alert("Partner Payout can't be 0");
82
				alert("Partner Payout can't be 0");
83
				return false;
83
				return false;
84
			} else if (isNaN(priceDropIn) || priceDropIn == 0) {
84
			} else if (isNaN(priceDropIn) || priceDropIn == 0) {
Line 104... Line 104...
104
	doGetAjaxRequestHandler(context+"/getItemDescription", function(response){
104
	doGetAjaxRequestHandler(context+"/getItemDescription", function(response){
105
		$('#' + domId).html(response);
105
		$('#' + domId).html(response);
106
	});
106
	});
107
}
107
}
108
function processPayout(priceDropProcessObj){
108
function processPayout(priceDropProcessObj){
109
	doPostAjaxRequestWithJsonHandler(context+"/processPriceDrop", priceDropProcessObj, function(response) {
109
	doPostAjaxRequestWithJsonHandler(context+"/processPriceDrop", JSON.stringify(priceDropProcessObj), function(response) {
110
		if (response == 'true') {
110
		if (response == 'true') {
111
			alert("PriceDrop sends successfully");
111
			alert("PriceDrop sends successfully");
112
			loadPriceDrop("main-content");
112
			loadPriceDrop("main-content");
113
		}
113
		}
114
		else {
114
		else {