Subversion Repositories SmartDukaan

Rev

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

Rev 31447 Rev 31568
Line 204... Line 204...
204
	webListingRank = $("#web-listing-rank").val();
204
	webListingRank = $("#web-listing-rank").val();
205
	webListingBannerUrl = $("#web-listing-bannerurl").val();
205
	webListingBannerUrl = $("#web-listing-bannerurl").val();
206
 
206
 
207
	webListingSource = $("#listingSource").val();
207
	webListingSource = $("#listingSource").val();
208
 
208
 
-
 
209
	webListingType = $("#webType").val();
-
 
210
 
-
 
211
 
209
	webListingHeaderUrl = $("#web-listing-headerurl").val();
212
	webListingHeaderUrl = $("#web-listing-headerurl").val();
210
 
213
 
211
	if (webListingTitle === "") {
214
	if (webListingTitle === "") {
212
		alert("Title is required!");
215
		alert("Title is required!");
213
		return false;
216
		return false;
Line 223... Line 226...
223
		return false;
226
		return false;
224
	}
227
	}
225
 
228
 
226
 
229
 
227
	if (webListingSource === "") {
230
	if (webListingSource === "") {
228
		alert("Rank  is required!");
231
		alert("Source  is required!");
229
		return false;
232
		return false;
230
	}
233
	}
-
 
234
	if (webListingType === "") {
-
 
235
		alert("Type  is required!");
-
 
236
		return false;
-
 
237
	}
-
 
238
 
231
 
239
 
-
 
240
	json = { title: webListingTitle, url: webListingUrl, rank: webListingRank, bannerUrl: webListingBannerUrl, headerUrl: webListingHeaderUrl, targetSource: webListingSource, type: webListingType };
232
 
241
 
233
	json = { title: webListingTitle, url: webListingUrl, rank: webListingRank, bannerUrl: webListingBannerUrl, headerUrl: webListingHeaderUrl, targetSource: webListingSource };
-
 
234
	
-
 
235
	console.log(json)
242
	console.log(json)
236
	doPostAjaxRequestWithJsonHandler(context + "/web-listing/add", JSON.stringify(json), function(response) {
243
	doPostAjaxRequestWithJsonHandler(context + "/web-listing/add", JSON.stringify(json), function(response) {
237
		$('#main-content').html(response);
244
		$('#main-content').html(response);
238
	});
245
	});
239
}
246
}