Subversion Repositories SmartDukaan

Rev

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

Rev 30603 Rev 30605
Line 21... Line 21...
21
 
21
 
22
 
22
 
23
$(document).on('click', ".updateWebOfferDuration", function() {
23
$(document).on('click', ".updateWebOfferDuration", function() {
24
	var webOfferId = $(this).data("id");
24
	var webOfferId = $(this).data("id");
25
 
25
 
-
 
26
	startDate = getDatesFromPicker('input[name="offerUpdatedateRange"]').startDate,
-
 
27
		endDate = getDatesFromPicker('input[name="offerUpdatedateRange"]').endDate
26
	if (confirm("Are you sure you want to update offer!") == true) {
28
	if (confirm("Are you sure you want to update offer!") == true) {
27
		doPostAjaxRequestHandler(context
29
		doPostAjaxRequestHandler(context
28
			+ "/web-offer-duration/update?id="
30
			+ "/web-offer-duration/update?id="
29
			+ webOfferId + "&startDate=" + startDate + "&endDate=" + endDate, function(response) {
31
			+ webOfferId + "&startDate=" + startDate + "&endDate=" + endDate, function(response) {
30
				if (response == 'true') {
32
				if (response == 'true') {
Line 92... Line 94...
92
		id: 0,
94
		id: 0,
93
		title: webOfferTitle,
95
		title: webOfferTitle,
94
		smallText: smallText,
96
		smallText: smallText,
95
		largeText: largeText,
97
		largeText: largeText,
96
		smallBannerUrl: smallBannerUrl,
98
		smallBannerUrl: smallBannerUrl,
97
		startDate: getDatesFromPicker($('input[name="offerdateRange"]')).startDate,
99
		startDate: getDatesFromPicker('input[name="offerdateRange"]').startDate,
98
		endDate: getDatesFromPicker($('input[name="offerdateRange"]')).endDate
100
		endDate: getDatesFromPicker('input[name="offerdateRange"]').endDate
99
	}
101
	}
100
	if (confirm("Are you sure you want to add the offer!") == true) {
102
	if (confirm("Are you sure you want to add the offer!") == true) {
101
		doPostAjaxRequestWithJsonHandler(context + "/web-offer/add", JSON.stringify(json), function(response) {
103
		doPostAjaxRequestWithJsonHandler(context + "/web-offer/add", JSON.stringify(json), function(response) {
102
			$('#main-content').html(response);
104
			$('#main-content').html(response);
103
		});
105
		});