Subversion Repositories SmartDukaan

Rev

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

Rev 28301 Rev 28566
Line 90... Line 90...
90
	webListingTitle = $("#web-listing-edit-title").val();
90
	webListingTitle = $("#web-listing-edit-title").val();
91
	webListingUrl = $("#web-listing-edit-url").val();
91
	webListingUrl = $("#web-listing-edit-url").val();
92
	webListingRank = $("#web-listing-edit-rank").val();
92
	webListingRank = $("#web-listing-edit-rank").val();
93
	webListingBannerUrl = $("#web-listing-edit-bannerurl").val();
93
	webListingBannerUrl = $("#web-listing-edit-bannerurl").val();
94
 
94
 
-
 
95
	webListingHeaderUrl = $("#web-listing-edit-headerurl").val();
-
 
96
 
95
	if (webListingTitle === "") {
97
	if (webListingTitle === "") {
96
		alert("Title is required!");
98
		alert("Title is required!");
97
		return false;
99
		return false;
98
	}
100
	}
99
 
101
 
Line 105... Line 107...
105
	if (webListingRank === "") {
107
	if (webListingRank === "") {
106
		alert("Rank  is required!");
108
		alert("Rank  is required!");
107
		return false;
109
		return false;
108
	}
110
	}
109
 
111
 
110
	json = { title: webListingTitle, url: webListingUrl, rank: webListingRank, bannerUrl: webListingBannerUrl };
112
	json = { title: webListingTitle, url: webListingUrl, rank: webListingRank, bannerUrl: webListingBannerUrl, headerUrl: webListingHeaderUrl };
111
	console.log(json)
113
	console.log(json)
112
	if (confirm("Are you sure you want to Edit the Web Listing!") == true) {
114
	if (confirm("Are you sure you want to Edit the Web Listing!") == true) {
113
		doPostAjaxRequestWithJsonHandler(`${context}/web-listing-edit/${webListingId}`, JSON.stringify(json),
115
		doPostAjaxRequestWithJsonHandler(`${context}/web-listing-edit/${webListingId}`, JSON.stringify(json),
114
			function(response) {
116
			function(response) {
115
				$('#main-content').html(response);
117
				$('#main-content').html(response);
Line 151... Line 153...
151
function addWebListing() {
153
function addWebListing() {
152
	webListingTitle = $("#web-listing-title").val();
154
	webListingTitle = $("#web-listing-title").val();
153
	webListingUrl = $("#web-listing-url").val();
155
	webListingUrl = $("#web-listing-url").val();
154
	webListingRank = $("#web-listing-rank").val();
156
	webListingRank = $("#web-listing-rank").val();
155
	webListingBannerUrl = $("#web-listing-bannerurl").val();
157
	webListingBannerUrl = $("#web-listing-bannerurl").val();
-
 
158
 
-
 
159
	webListingHeaderUrl = $("#web-listing-headerurl").val();
-
 
160
 
156
	if (webListingTitle === "") {
161
	if (webListingTitle === "") {
157
		alert("Title is required!");
162
		alert("Title is required!");
158
		return false;
163
		return false;
159
	}
164
	}
160
 
165
 
Line 167... Line 172...
167
		alert("Rank  is required!");
172
		alert("Rank  is required!");
168
		return false;
173
		return false;
169
	}
174
	}
170
 
175
 
171
 
176
 
172
	json = { title: webListingTitle, url: webListingUrl, rank: webListingRank, bannerUrl: webListingBannerUrl };
177
	json = { title: webListingTitle, url: webListingUrl, rank: webListingRank, bannerUrl: webListingBannerUrl, headerUrl: webListingHeaderUrl };
173
	doPostAjaxRequestWithJsonHandler(context + "/web-listing/add", JSON.stringify(json), function(response) {
178
	doPostAjaxRequestWithJsonHandler(context + "/web-listing/add", JSON.stringify(json), function(response) {
174
		$('#main-content').html(response);
179
		$('#main-content').html(response);
175
	});
180
	});
176
}
181
}
177
 
182