Subversion Repositories SmartDukaan

Rev

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

Rev 23556 Rev 23557
Line 68... Line 68...
68
	});
68
	});
69
	
69
	
70
	$(".schemes-update").live('click', function() {
70
	$(".schemes-update").live('click', function() {
71
		loadSchemeUpdatePage("main-content");
71
		loadSchemeUpdatePage("main-content");
72
	});
72
	});
-
 
73
 
-
 
74
	$(".add-schemes").live('click', function() {
-
 
75
		schemeIds = $("#schemeids").val();
-
 
76
		itemIds = $("#itemids").val();
-
 
77
		if(itemIds.trim().length === 0 || schemeIds.trim().length === 0) {
-
 
78
			alert("fields shouldn't be blank");
-
 
79
		}
-
 
80
		updateSchemes(schemeIds, itemIds);
-
 
81
	});
73
});
82
});
74
 
83
 
75
function configureTagListingItemsDescriptionDropDown(){
84
function configureTagListingItemsDescriptionDropDown(){
76
	$(document).ready(function() {
85
	$(document).ready(function() {
77
        $('#tagListingItemsDescription').multiselect({
86
        $('#tagListingItemsDescription').multiselect({
Line 196... Line 205...
196
 
205
 
197
function loadSchemeUpdatePage(domId){
206
function loadSchemeUpdatePage(domId){
198
	doGetAjaxRequestHandler(context+"/schemes/update-schemes-page", function(response){
207
	doGetAjaxRequestHandler(context+"/schemes/update-schemes-page", function(response){
199
		$('#' + domId).html(response);
208
		$('#' + domId).html(response);
200
	});
209
	});
-
 
210
}
-
 
211
 
-
 
212
function updateSchemes(shcemeIds, itemIds){
-
 
213
	doPostAjaxRequestWithJsonHandler(context + '/schemes/update', JSON.stringify({"itemIds":itemIds.split(",").map(Number), "schemeIds":schemeIds.split(",").map(Number)}), function(response){
-
 
214
		if(response=='true') {
-
 
215
			alert("Schemes Added successfully");
-
 
216
		}
-
 
217
	});
201
}
218
}
202
219