Subversion Repositories SmartDukaan

Rev

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

Rev 26353 Rev 26355
Line 129... Line 129...
129
	$('button.mk_download_pricing').live('click', function(){
129
	$('button.mk_download_pricing').live('click', function(){
130
		doAjaxGetDownload(context+"/tagListing/download/4", "pricing.xlsx")
130
		doAjaxGetDownload(context+"/tagListing/download/4", "pricing.xlsx")
131
	});
131
	});
132
	
132
	
133
	$('.mk_auto_process').live('click', function (){
133
	$('.mk_auto_process').live('click', function (){
-
 
134
		if (confirm("Are you sure you want to Process Payout?")) {
-
 
135
			clickedPriceDrop = $(this);
-
 
136
			var trElement=$(this).closest('tr');
134
		doAjaxRequestWithJsonHandler(context+"/tagListing/download/4", "pricing.xlsx")
137
			var priceDropId = trElement.data('pricedropid');
-
 
138
			autoProcess({priceDropId:priceDropId})
-
 
139
		}
135
	});
140
	});
136
 
141
 
137
	$('.mk_view_imeis').live('click', function (){
142
	$('.mk_view_imeis').live('click', function (){
138
		clickedPriceDrop = $(this);
143
		clickedPriceDrop = $(this);
139
		var trElement=$(this).closest('tr');
144
		var trElement=$(this).closest('tr');
Line 162... Line 167...
162
			$('span.mk_rejected_count').html(rejectedArr.length);
167
			$('span.mk_rejected_count').html(rejectedArr.length);
163
			$('select.mk_rejected').html(rejectedArr.join(''));
168
			$('select.mk_rejected').html(rejectedArr.join(''));
164
			//if(rejected) {}
169
			//if(rejected) {}
165
		});
170
		});
166
	});
171
	});
167
	
-
 
168
	$('.mk_process_price_drop').live('click', function (){
-
 
169
		if (confirm("Are you sure you want to Update Payout?")) {
-
 
170
			processPayout(priceDropProcessObj)
-
 
171
		}
-
 
172
	});
-
 
173
 
172
 
174
	$('.mk_add_payout').live('click', function (){
173
	$('.mk_add_payout').live('click', function (){
175
		if (confirm("Are you sure you want to add price Drop?")) {
174
		if (confirm("Are you sure you want to add price Drop?")) {
176
			var trElement=$(this).closest('tr');
175
			var trElement=$(this).closest('tr');
177
			var priceDropId = trElement.data('pricedropid');
176
			var priceDropId = trElement.data('pricedropid');
Line 208... Line 207...
208
			alert("Some error occurred while adding payout.");
207
			alert("Some error occurred while adding payout.");
209
		}
208
		}
210
	});
209
	});
211
}
210
}
212
 
211
 
213
function processPayout(priceDropProcessObj){
212
function autoProcess(priceDropObj){
214
	doPostAjaxRequestWithJsonHandler(context+"/processPriceDrop", JSON.stringify(priceDropProcessObj), function(response) {
213
	doPostAjaxRequestWithJsonHandler(context+"/processPriceDrop", JSON.stringify(priceDropObj), function(response) {
215
		if (response == 'true') {
214
		if (response == 'true') {
216
			alert("PriceDrop sends successfully");
215
			alert("PriceDrop sends successfully");
217
			loadPriceDrop("main-content");
216
			loadPriceDrop("main-content");
218
		}
217
		}
219
		else {
218
		else {