Subversion Repositories SmartDukaan

Rev

Rev 29811 | Rev 30877 | Go to most recent revision | Details | Compare with Previous | 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");
29813 tejbeer 9
	var id = $(this).data('id');
10
	if (confirm('Are you sure you want to activate?')) {
11
		doPostAjaxRequestHandler(context + "/activateKred?id=" + id,
29811 tejbeer 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");
29813 tejbeer 24
	var id = $(this).data('id');
25
	if (confirm('Are you sure you want to deactivate?')) {
26
		doPostAjaxRequestHandler(context + "/deactivateKred?id=" + id,
29811 tejbeer 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
}