Subversion Repositories SmartDukaan

Rev

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

Rev 27071 Rev 27754
Line 1... Line 1...
1
 
1
 
2
	$("button.processPayout").live('click', function() {
2
	$(document).on('click', "button.processPayout", function() {
3
		if($(".mk_pending")) {
3
		if($(".mk_pending")) {
4
			
4
			
5
		}
5
		}
6
	}); 
6
	}); 
7
 
7
 
8
	$("button.add-pricing").live('click', function() {
8
	$(document).on('click', "button.add-pricing", function() {
9
		if($("#typeaheaditem1").val().trim().length == 0){
9
		if($("#typeaheaditem1").val().trim().length == 0){
10
			alert("Please choose Item");
10
			alert("Please choose Item");
11
			return;
11
			return;
12
		}
12
		}
13
		var mop = $("#mop").val();
13
		var mop = $("#mop").val();
Line 60... Line 60...
60
				});
60
				});
61
			}
61
			}
62
		});
62
		});
63
		
63
		
64
	});
64
	});
65
	$("button.addPriceDrop").live('click', function() {
65
	$(document).on('click', "button.addPriceDrop", function() {
66
		if($("#typeaheaditem").val().trim().length == 0){
66
		if($("#typeaheaditem").val().trim().length == 0){
67
			alert("Please choose Item");
67
			alert("Please choose Item");
68
			return;
68
			return;
69
		}
69
		}
70
		var newDp = $("#newDp").val();
70
		var newDp = $("#newDp").val();
Line 114... Line 114...
114
						}
114
						}
115
					}
115
					}
116
			);
116
			);
117
		}
117
		}
118
	});
118
	});
119
	$('input.downloadtotalIMEI').live('click', function (){
119
	$(document).on('click', 'input.downloadtotalIMEI', function (){
120
		var priceDropId=$(this).closest('tr').data('pricedropid');
120
		var priceDropId=$(this).closest('tr').data('pricedropid');
121
		doAjaxGetDownload(context+"/downloadtotalPriceDropIMEI/"+priceDropId,
121
		doAjaxGetDownload(context+"/downloadtotalPriceDropIMEI/"+priceDropId,
122
		"totalPriceDropIMEI"+priceDropId+".csv");
122
		"totalPriceDropIMEI"+priceDropId+".csv");
123
	});
123
	});
124
	
124
	
125
	$('button.download-imeis').live('click', function(){
125
	$(document).on('click', 'button.download-imeis', function(){
126
		doAjaxGetDownload(context+"/price-drop/imes/download/?affectedDate="+startDate +"&itemId=" + currentItem.itemId, "pricedrop.csv")
126
		doAjaxGetDownload(context+"/price-drop/imes/download/?affectedDate="+startDate +"&itemId=" + currentItem.itemId, "pricedrop.csv")
127
	});
127
	});
128
	
128
	
129
	$('button.mk_download_pricing').live('click', function(){
129
	$(document).on('click', 'button.mk_download_pricing', 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
	$(document).on('click', '.mk_auto_process', function (){
134
		var trElement=$(this).closest('tr');
134
		var trElement=$(this).closest('tr');
135
		var payout = trElement.find('input.partner-payout').val();
135
		var payout = trElement.find('input.partner-payout').val();
136
		if(isNaN(parseInt(payout)) || parseInt(payout) <=0) {
136
		if(isNaN(parseInt(payout)) || parseInt(payout) <=0) {
137
			alert("Invalid payout amount");
137
			alert("Invalid payout amount");
138
		}
138
		}
Line 141... Line 141...
141
			var priceDropId = trElement.data('pricedropid');
141
			var priceDropId = trElement.data('pricedropid');
142
			autoProcess({priceDropId:priceDropId, partnerPayout:payout, activatedOnly:$(this).data('activatedonly')})
142
			autoProcess({priceDropId:priceDropId, partnerPayout:payout, activatedOnly:$(this).data('activatedonly')})
143
		}
143
		}
144
	});
144
	});
145
 
145
 
146
	$('.mk_view_imeis').live('click', function (){
146
	$(document).on('click', '.mk_view_imeis', function (){
147
		clickedPriceDrop = $(this);
147
		clickedPriceDrop = $(this);
148
		var trElement=$(this).closest('tr');
148
		var trElement=$(this).closest('tr');
149
		var priceDropId = trElement.data('pricedropid');
149
		var priceDropId = trElement.data('pricedropid');
150
		
150
		
151
		doAjaxRequestWithJsonHandler(context+"/priceDropImeis/"+ priceDropId, 'GET', null, function(response) {
151
		doAjaxRequestWithJsonHandler(context+"/priceDropImeis/"+ priceDropId, 'GET', null, function(response) {
Line 172... Line 172...
172
			$('select.mk_rejected').html(rejectedArr.join(''));
172
			$('select.mk_rejected').html(rejectedArr.join(''));
173
			//if(rejected) {}
173
			//if(rejected) {}
174
		});
174
		});
175
	});
175
	});
176
 
176
 
177
	$('.mk_add_payout').live('click', function (){
177
	$(document).on('click', '.mk_add_payout', function (){
178
		if (confirm("Are you sure you want to add price Drop?")) {
178
		if (confirm("Are you sure you want to add price Drop?")) {
179
			var trElement=$(this).closest('tr');
179
			var trElement=$(this).closest('tr');
180
			var priceDropId = trElement.data('pricedropid');
180
			var priceDropId = trElement.data('pricedropid');
181
			var partnerPayout = trElement.find('.partner-payout').val();
181
			var partnerPayout = trElement.find('.partner-payout').val();
182
			var priceDropIn = trElement.find('.price-drop-in').val();
182
			var priceDropIn = trElement.find('.price-drop-in').val();