Subversion Repositories SmartDukaan

Rev

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

Rev 27805 Rev 27812
Line 139... Line 139...
139
		$("#tag-listing-brand-value").addClass("border-highlight");
139
		$("#tag-listing-brand-value").addClass("border-highlight");
140
		error = true;
140
		error = true;
141
		return error;
141
		return error;
142
	}
142
	}
143
	
143
	
144
	$("#tagListingItemsDescription").removeClass("border-hightlight");
144
	$("select.tagListingItemsDescription").removeClass("border-hightlight");
145
	var itemIdsString = $("select.tagListingItemsDescription").val();
145
	var itemIdsString = $("select.tagListingItemsDescription").val();
146
	debugger;
146
	debugger;
147
	if(itemIdsString == null){
147
	if(itemIdsString == null){
148
		alert("Please choose items");
148
		alert("Please choose items");
149
		$("#tagListingItemsDescription").addClass("border-highlight");
149
		$("select.tagListingItemsDescription").addClass("border-highlight");
150
		error = true;
150
		error = true;
151
		return error;
151
		return error;
152
	}
152
	}
153
		
153
		
154
	console.log("validation scheme error = " + error);
154
	console.log("validation scheme error = " + error);
Line 166... Line 166...
166
	schemeObject['partnerType'] = $('#retailerType').val();
166
	schemeObject['partnerType'] = $('#retailerType').val();
167
	schemeObject['cashback'] = $("#cashbackScheme").is(":checked")
167
	schemeObject['cashback'] = $("#cashbackScheme").is(":checked")
168
	schemeObject['startDate'] = startDate;
168
	schemeObject['startDate'] = startDate;
169
	schemeObject['endDate'] = endDate;
169
	schemeObject['endDate'] = endDate;
170
	schemeObject['itemIds'] = [];
170
	schemeObject['itemIds'] = [];
171
	var itemIds = $("#tagListingItemsDescription").val();
171
	var itemIds = $("select.tagListingItemsDescription").val();
172
	//var itemIds = itemIdsString.substring(1, itemIdsString.length - 1).split(",");
172
	//var itemIds = itemIdsString.substring(1, itemIdsString.length - 1).split(",");
173
	for(var i = 0; i < itemIds.length; i++){
173
	for(var i = 0; i < itemIds.length; i++){
174
		schemeObject['itemIds'].push(parseInt(itemIds[i]));
174
		schemeObject['itemIds'].push(parseInt(itemIds[i]));
175
	}
175
	}
176
	return JSON.stringify(schemeObject);
176
	return JSON.stringify(schemeObject);