Subversion Repositories SmartDukaan

Rev

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

Rev 28079 Rev 28381
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
 
2
 
3
$(document).on('click', '.retail-block-brand-submit', function() { 
3
	$(document).on('click', '.retail-block-brand-submit', function() {
4
             var brand = $('#block-brand').val();
4
		var brand = $('#block-brand').val();
5
             var fofoIds = $('#selected-block-ids').val();
5
		var fofoIds = $('#selected-block-ids').val();
6
            if (confirm("Are you sure you want to submit") == true) {
6
		if (confirm("Are you sure you want to submit") == true) {
7
        doPostAjaxRequestHandler(context + "/getRetailerBlockBrandMappping?brand="+brand+"&fofoIds="+fofoIds,
7
			doPostAjaxRequestHandler(context + "/getRetailerBlockBrandMappping?brand=" + brand + "&fofoIds=" + fofoIds,
-
 
8
				function(response) {
-
 
9
					if (response = true) {
-
 
10
 
-
 
11
						alert("Successfully Submitted");
-
 
12
						$("button.block-brand-submit").click();
-
 
13
					}
-
 
14
				});
-
 
15
		}
-
 
16
	});
-
 
17
 
-
 
18
 
-
 
19
 
-
 
20
	$(document).on('click', '.block-brand-submit', function() {
-
 
21
 
-
 
22
		var brand = $('#block-brand').val();
-
 
23
 
-
 
24
 
-
 
25
		doGetAjaxRequestHandler(context + "/getBlockBrand?brand=" + brand,
8
			function(response) {
26
			function(response) {
9
				if(response =true){
-
 
10
				
-
 
11
				alert("Successfully Submitted");
-
 
12
				$("button.block-brand-submit").click();
27
				$('.partnersbyblockbrands').html(response);
13
				}
-
 
14
			});
28
			});
-
 
29
 
-
 
30
 
15
			}
31
	});
-
 
32
 
-
 
33
 
-
 
34
 
-
 
35
 
-
 
36
	$(document).on('click', '.brands-limit-submit', function() {
-
 
37
 
-
 
38
		var brand = $('#show-brands').val();
-
 
39
 
-
 
40
 
-
 
41
		doGetAjaxRequestHandler(context + "/getRetailerBrandslimitMapping?brand=" + brand,
-
 
42
			function(response) {
-
 
43
				$('.partnerByBrandsLimit').html(response);
16
			});
44
			});
17
			
45
	})
-
 
46
 
18
		
47
 
-
 
48
 
19
     
49
 
20
       $(document).on('click', '.block-brand-submit', function() { 
50
	$(document).on('click', '.pincode-submit', function() {
-
 
51
 
21
       
52
		var fofoId = partnerId;
22
               var brand = $('#block-brand').val();
53
		var pincode = $('#partnerPincode').val();
-
 
54
 
23
              
55
		console.log("pin" + pincode);
-
 
56
 
24
        
57
 
25
        doGetAjaxRequestHandler(context + "/getBlockBrand?brand=" + brand,
58
		doPostAjaxRequestHandler(context + "/setPartnerPincode?pincode=" + pincode + "&fofoId=" + fofoId,
26
			function(response) {
59
			function(response) {
27
				$('.partnersbyblockbrands').html(response);
60
			$('.partner-pincode-container').html(response);
-
 
61
 
-
 
62
			});
-
 
63
 
-
 
64
	});
-
 
65
 
-
 
66
$(document).on('click', '.pincode-serach-submit', function() {
-
 
67
 
-
 
68
		var pincode = $('#searchPincode').val();
-
 
69
 
-
 
70
		console.log("pin" + pincode);
-
 
71
		doGetAjaxRequestHandler(context + "/searchPincodePartner?pincode=" + pincode,
-
 
72
			function(response) {
-
 
73
			$('.pincode-container').html(response);
-
 
74
 
-
 
75
			});
-
 
76
 
-
 
77
	});
-
 
78
	
-
 
79
	$(document).on('click', '.remove-pincode', function() {
-
 
80
     var pin = $(this).data('pin');
-
 
81
		var id = $(this).data('id');
-
 
82
        var fofoId = $(this).data('fofoid');
-
 
83
		console.log(pin);
-
 
84
		console.log(fofoId);
-
 
85
		if (confirm("Are you sure you want to remove  this pincode") == true) {
-
 
86
			doPostAjaxRequestHandler(context + "/removeSearchPincode?id=" + id + "&fofoId=" + fofoId + "&pin=" + pin,
-
 
87
				function(response) {
-
 
88
 
-
 
89
				$('.pincode-container').html(response);
-
 
90
					
-
 
91
				});
-
 
92
		}
28
			});
93
			});
-
 
94
 
-
 
95
	
-
 
96
	
-
 
97
	
-
 
98
$(document).on('click', ".pincode-delete", function() {
-
 
99
 
-
 
100
		
-
 
101
		var id = $(this).data('id');
-
 
102
		var fofoId = $(this).data('fofoid');
-
 
103
		console.log(fofoId);
-
 
104
		if (confirm("Are you sure you want to remove  this pincode") == true) {
-
 
105
			doPostAjaxRequestHandler(context + "/removePartnerPincode?id=" + id + "&fofoId=" + fofoId,
29
             
106
				function(response) {
-
 
107
 
-
 
108
						$('.partner-pincode-container').html(response);
30
         
109
					
31
        });
110
				});
-
 
111
		}
-
 
112
 
-
 
113
	});
32
 
114
 
33
});
115
});
34
116