Subversion Repositories SmartDukaan

Rev

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

Rev 9242 Rev 9478
Line 65... Line 65...
65
	$("#search_item").live('click', function() {
65
	$("#search_item").live('click', function() {
66
		var searchText = $('#search_text').val();
66
		var searchText = $('#search_text').val();
67
		loadSearchInfo(searchText);
67
		loadSearchInfo(searchText);
68
    });
68
    });
69
	$(".editItem").live('click', function() {
69
	$(".editItem").live('click', function() {
70
		var itemId = $(this).attr('itemId')
70
		var itemId = $(this).attr("it");
71
		loadItemDetails("/Support/snapdeal-list/"+ itemId +"/edit");
71
		loadItemDetails("/Support/snapdeal-list/"+ itemId +"/edit");
72
    });
72
    });
73
});
73
});
74
</script>
74
</script>
75
<script type="text/javascript">
75
<script type="text/javascript">
Line 190... Line 190...
190
$(function(){	
190
$(function(){	
191
$("#snapdeal-form").live('submit', function(){
191
$("#snapdeal-form").live('submit', function(){
192
	var itemWeight=document.forms["snapdeal-form"]["itemWeight"].value;
192
	var itemWeight=document.forms["snapdeal-form"]["itemWeight"].value;
193
	var warehouseId=document.forms["snapdeal-form"]["warehouseId"].value;
193
	var warehouseId=document.forms["snapdeal-form"]["warehouseId"].value;
194
	var transferPrice=document.forms["snapdeal-form"]["transferPrice"].value;
194
	var transferPrice=document.forms["snapdeal-form"]["transferPrice"].value;
-
 
195
	var maxNlc=document.forms["snapdeal-form"]["maxNlc"].value;
195
	
196
	
196
	if (warehouseId=="" || isNaN(warehouseId)){
197
	if (warehouseId=="" || isNaN(warehouseId)){
197
		jAlert('Illegal Entry In Warehouse Id', 'ERROR');
198
		jAlert('Illegal Entry In Warehouse Id', 'ERROR');
198
		return false;
199
		return false;
199
	}
200
	}
200
	
201
	
201
	if (transferPrice==0 || transferPrice=="" || isNaN(transferPrice)){
202
	if (transferPrice==0 || transferPrice=="" || isNaN(transferPrice)){
202
		jAlert('Illegal Entry In Transfer Price', 'ERROR');
203
		jAlert('Illegal Entry In Transfer Price', 'ERROR');
203
		return false;
204
		return false;
204
	}
205
	}
-
 
206
	
-
 
207
	if (maxNlc==0 || maxNlc=="" || isNaN(maxNlc)){
-
 
208
		jAlert('Illegal Entry In Max NLC field', 'ERROR');
-
 
209
		return false;
-
 
210
	}
-
 
211
	
-
 
212
	
205
 
213
 
206
	var data = $(this).serialize() 
214
	var data = $(this).serialize() 
207
 
215
 
208
    jQuery.ajax({
216
    jQuery.ajax({
209
        url: "/Support/snapdeal-list!update",
217
        url: "/Support/snapdeal-list!update",
Line 236... Line 244...
236
$("#add-new-item").live('submit', function(){
244
$("#add-new-item").live('submit', function(){
237
	var itemWeight=document.forms["add-new-item"]["itemWeight"].value;
245
	var itemWeight=document.forms["add-new-item"]["itemWeight"].value;
238
	var transferPrice=document.forms["add-new-item"]["transferPrice"].value;
246
	var transferPrice=document.forms["add-new-item"]["transferPrice"].value;
239
	var warehouseId=document.forms["add-new-item"]["warehouseId"].value;
247
	var warehouseId=document.forms["add-new-item"]["warehouseId"].value;
240
	var itemId=document.forms["add-new-item"]["itemId"].value;
248
	var itemId=document.forms["add-new-item"]["itemId"].value;
-
 
249
	var maxNlc=document.forms["add-new-item"]["maxNlc"].value;
241
	
250
	
242
	if (itemId==0 || itemId=="" || isNaN(itemId)){
251
	if (itemId==0 || itemId=="" || isNaN(itemId)){
243
		jAlert('Illegal Entry In Item Id ', 'ERROR');
252
		jAlert('Illegal Entry In Item Id ', 'ERROR');
244
		return false;
253
		return false;
245
	}
254
	}
Line 252... Line 261...
252
	if (transferPrice==0 || transferPrice=="" || isNaN(transferPrice)){
261
	if (transferPrice==0 || transferPrice=="" || isNaN(transferPrice)){
253
		jAlert('Illegal Entry In Transfer Price ', 'ERROR');
262
		jAlert('Illegal Entry In Transfer Price ', 'ERROR');
254
		return false;
263
		return false;
255
	}
264
	}
256
	
265
	
-
 
266
	if (maxNlc==0 || maxNlc=="" || isNaN(maxNlc)){
-
 
267
		jAlert('Illegal Entry In Max NLC field', 'ERROR');
-
 
268
		return false;
-
 
269
	}
-
 
270
	
257
    var data = $(this).serialize() 
271
    var data = $(this).serialize() 
258
 
272
 
259
    jQuery.ajax({
273
    jQuery.ajax({
260
        url: "/Support/snapdeal-list!addNewItem",
274
        url: "/Support/snapdeal-list!addNewItem",
261
        type: 'POST',
275
        type: 'POST',