Subversion Repositories SmartDukaan

Rev

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

Rev 28494 Rev 28711
Line 6... Line 6...
6
			searchContent = "";
6
			searchContent = "";
7
		}
7
		}
8
		getRetailerDetailsByEmailIdOrMobileNumber(
8
		getRetailerDetailsByEmailIdOrMobileNumber(
9
			"retailer-details-container", searchContent);
9
			"retailer-details-container", searchContent);
10
	});
10
	});
-
 
11
	
-
 
12
	$(document).on('click', ".activate-store-temporary", function() {
-
 
13
		var row = $(this).closest("tr");
-
 
14
		var fofoId = $(this).data("fofoid");
-
 
15
		
-
 
16
		var ActiveDays = $(row).find("td:eq(4) input[type='text']").val();
-
 
17
		console.log("ActiveDays" + ActiveDays);
-
 
18
		console.log("fofoId" + fofoId);
-
 
19
		var days = parseInt(ActiveDays);
-
 
20
		
-
 
21
		doPostAjaxRequestHandler(context + "/activateStoreTemporary?fofoId=" + fofoId + "&days=" + days,
-
 
22
				function(response) {
-
 
23
					if (response == "true") {
-
 
24
						alert("successfully activated!");
-
 
25
						inactiveStoreInfo("main-content");
-
 
26
					}
11
 
27
 
-
 
28
				});
-
 
29
		
-
 
30
		
-
 
31
		
-
 
32
 
-
 
33
	});
12
	$(document).on('click', ".active-store", function() {
34
	$(document).on('click', ".active-store", function() {
13
		storeInfo("main-content");
35
		storeInfo("main-content");
14
	});
36
	});
15
	$(document).on('click', ".inactive-store", function() {
37
	$(document).on('click', ".inactive-store", function() {
16
		inactiveStoreInfo("main-content");
38
		inactiveStoreInfo("main-content");
Line 88... Line 110...
88
		if (confirm("Are you sure you want to deactivate store!") == true) {
110
		if (confirm("Are you sure you want to deactivate store!") == true) {
89
			deactivateStore("main-content", fofoId);
111
			deactivateStore("main-content", fofoId);
90
		}
112
		}
91
 
113
 
92
	});
114
	});
-
 
115
	$(document).on('click', ".activate-store-forever", function() {
-
 
116
		var fofoId = $(this).data("fofoid");
-
 
117
		console.log(fofoId);
-
 
118
		if (confirm("Are you sure you want to activate this store!") == true) {
-
 
119
			activateStoreForever("main-content", fofoId);
-
 
120
		}
-
 
121
 
-
 
122
	});
-
 
123
	
93
	$(document).on('click', ".login_as", function() {
124
	$(document).on('click', ".login_as", function() {
94
		var fofoId = $('#partnerId').val();
125
		var fofoId = $('#partnerId').val();
95
		loginAsPartner(fofoId);
126
		loginAsPartner(fofoId);
96
 
127
 
97
	});
128
	});
Line 358... Line 389...
358
				storeInfo(domId);
389
				storeInfo(domId);
359
			}
390
			}
360
 
391
 
361
		});
392
		});
362
}
393
}
-
 
394
function activateStoreForever(domId, fofoId) {
-
 
395
	doPostAjaxRequestHandler(context + "/activateStoreForever?fofoId=" + fofoId,
-
 
396
		function(response) {
-
 
397
			if (response == "true") {
-
 
398
				alert("successfully activated!");
-
 
399
				inactiveStoreInfo(domId);
-
 
400
			}
-
 
401
 
-
 
402
		});
-
 
403
}
363
 
404
 
364
function loginAsPartner(fofoId) {
405
function loginAsPartner(fofoId) {
365
	doGetAjaxRequestHandler(context + "/login-as-partner?fofoId=" + fofoId,
406
	doGetAjaxRequestHandler(context + "/login-as-partner?fofoId=" + fofoId,
366
		function(response) {
407
		function(response) {
367
			window.create({
408
			window.create({