Subversion Repositories SmartDukaan

Rev

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

Rev 29907 Rev 29912
Line 110... Line 110...
110
    	<span class="input-group-addon">${holder3}</span>
110
    	<span class="input-group-addon">${holder3}</span>
111
    	</div>`;
111
    	</div>`;
112
    $allSlabContainers.html(slabHtml.repeat(9));
112
    $allSlabContainers.html(slabHtml.repeat(9));
113
}
113
}
114
$(document).on('click', 'a.mk_offer_active', function(){
114
$(document).on('click', 'a.mk_offer_active', function(){
115
	let offerId = $(this).closest('tr').data("id");
115
	let offerId = $(this).closest('tr').data("offerid");
116
	doGetAjaxRequestHandler(`${context}/offer/active/${offerId}`, function (response) {
116
	doGetAjaxRequestHandler(`${context}/offer/active/${offerId}`, function (response) {
117
		alert("Offer is now active");
117
		alert("Offer is now active");
118
		$(this).closest("li").html(`<a class="mk_offer_inactive" href="javascript:void(0)">Mark Inactive</a>`);
118
		$(this).closest("li").html(`<a class="mk_offer_inactive" href="javascript:void(0)">Mark Inactive</a>`);
119
    });
119
    });
120
});
120
});
121
$(document).on('click', 'a.mk_offer_inactive', function(){
121
$(document).on('click', 'a.mk_offer_inactive', function(){
122
	let offerId = $(this).closest('tr').data("id");
122
	let offerId = $(this).closest('tr').data("offerid");
123
	doGetAjaxRequestHandler(`${context}/offer/active/${offerId}?active=false`, function (response) {
123
	doGetAjaxRequestHandler(`${context}/offer/active/${offerId}?active=false`, function (response) {
124
		alert("Offer is now inactive");
124
		alert("Offer is now inactive");
125
		$(this).closest("li").html(`<a class="mk_offer_active" href="javascript:void(0)">Mark Active</a>`);
125
		$(this).closest("li").html(`<a class="mk_offer_active" href="javascript:void(0)">Mark Active</a>`);
126
    });
126
    });
127
});
127
});