Subversion Repositories SmartDukaan

Rev

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

Rev 29876 Rev 29907
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 spanContainer = $(this).closest('span.mk_active');
-
 
116
	let offerId = spanContainer.data("id");
115
	let offerId = $(this).closest('tr').data("id");
117
	doGetAjaxRequestHandler(`${context}/offer/active/${offerId}`, function (response) {
116
	doGetAjaxRequestHandler(`${context}/offer/active/${offerId}`, function (response) {
118
		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>`);
-
 
119
    });
-
 
120
});
-
 
121
$(document).on('click', 'a.mk_offer_inactive', function(){
-
 
122
	let offerId = $(this).closest('tr').data("id");
-
 
123
	doGetAjaxRequestHandler(`${context}/offer/active/${offerId}?active=false`, function (response) {
119
		spanContainer.html("Now Active");
124
		alert("Offer is now inactive");
-
 
125
		$(this).closest("li").html(`<a class="mk_offer_active" href="javascript:void(0)">Mark Active</a>`);
120
    });
126
    });
121
});
127
});
122
$(document).on('click', 'button.slab-add', function(){
128
$(document).on('click', 'button.slab-add', function(){
123
	newTargetSlab = $(targetSlabTemplate);
129
	newTargetSlab = $(targetSlabTemplate);
124
	$('div.targetslabscontainer').append(newTargetSlab);	
130
	$('div.targetslabscontainer').append(newTargetSlab);