Subversion Repositories SmartDukaan

Rev

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

Rev 29813 Rev 30877
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
	loadCreditDetail("main-content");
-
 
3
});
-
 
4
 
2
 
-
 
3
	$(document).on('click', ".partner-credit-detail", function() {
5
 
4
 
-
 
5
		loadCreditDetail("main-content");
-
 
6
	});
6
 
7
 
7
$(document).on('click', '.activate-partner-kred', function() {
-
 
8
	var row = $(this).closest("tr");
-
 
9
	var id = $(this).data('id');
-
 
10
	if (confirm('Are you sure you want to activate?')) {
-
 
11
		doPostAjaxRequestHandler(context + "/activateKred?id=" + id,
-
 
12
			function(response) {
-
 
13
				row.html(response);
-
 
14
				alert("successfully activate");
-
 
15
 
8
 
16
 
9
 
17
 
10
 
-
 
11
	$(document).on('click', '.activate-partner-kred', function() {
-
 
12
		var row = $(this).closest("tr");
-
 
13
		var id = $(this).data('id');
18
			});
14
		console.log(id)
-
 
15
		if (confirm('Are you sure you want to activate?')) {
-
 
16
			doPostAjaxRequestHandler(context + "/activateKred?id=" + id,
19
	}
17
				function(response) {
20
});
18
					row.html(response);
-
 
19
					alert("successfully activate");
21
 
20
 
22
$(document).on('click', '.deactivate-partner-kred', function() {
-
 
23
	var row = $(this).closest("tr");
-
 
24
	var id = $(this).data('id');
-
 
25
	if (confirm('Are you sure you want to deactivate?')) {
-
 
26
		doPostAjaxRequestHandler(context + "/deactivateKred?id=" + id,
-
 
27
			function(response) {
-
 
28
				row.html(response);
-
 
29
				alert("successfully deactivate");
-
 
30
 
21
 
-
 
22
 
31
			});
23
				});
-
 
24
		}
-
 
25
	});
-
 
26
 
-
 
27
	$(document).on('click', '.deactivate-partner-kred', function() {
-
 
28
		var row = $(this).closest("tr");
-
 
29
		var id = $(this).data('id');
-
 
30
		console.log(id)
-
 
31
 
-
 
32
		if (confirm('Are you sure you want to deactivate?')) {
-
 
33
			doPostAjaxRequestHandler(context + "/deactivateKred?id=" + id,
-
 
34
				function(response) {
-
 
35
					row.html(response);
-
 
36
					alert("successfully deactivate");
-
 
37
 
-
 
38
				});
32
	}
39
		}
-
 
40
	});
-
 
41
 
33
});
42
});
34
 
43
 
35
function loadCreditDetail(domId) {
44
function loadCreditDetail(domId) {
36
	$(document).on('click', ".partner-credit-detail", function() {
-
 
37
		doGetAjaxRequestHandler(context + "/getCreditDetail",
45
	doGetAjaxRequestHandler(context + "/getCreditDetail",
38
			function(response) {
46
		function(response) {
39
				$('#' + domId).html(response);
47
			$('#' + domId).html(response);
40
			});
48
		});
-
 
49
 
41
 
50
 
42
	});
-
 
43
}
51
}
44
52