Subversion Repositories SmartDukaan

Rev

Rev 29813 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
29811 tejbeer 1
$(function() {
2
	loadCreditDetail("main-content");
3
});
4
 
5
 
6
 
7
$(document).on('click', '.activate-partner-kred', function() {
8
	var row = $(this).closest("tr");
9
	var fofoId = $(this).data('fofoid');
10
	if (confirm('Confirm upload ?')) {
11
		doPostAjaxRequestHandler(context + "/activateKred?fofoId=" + fofoId,
12
			function(response) {
13
				row.html(response);
14
				alert("successfully activate");
15
 
16
 
17
 
18
			});
19
	}
20
});
21
 
22
$(document).on('click', '.deactivate-partner-kred', function() {
23
	var row = $(this).closest("tr");
24
	var fofoId = $(this).data('fofoid');
25
	if (confirm('Confirm upload ?')) {
26
		doPostAjaxRequestHandler(context + "/deactivateKred?fofoId=" + fofoId,
27
			function(response) {
28
				row.html(response);
29
				alert("successfully deactivate");
30
 
31
			});
32
	}
33
});
34
 
35
function loadCreditDetail(domId) {
36
	$(document).on('click', ".partner-credit-detail", function() {
37
		doGetAjaxRequestHandler(context + "/getCreditDetail",
38
			function(response) {
39
				$('#' + domId).html(response);
40
			});
41
 
42
	});
43
}