Subversion Repositories SmartDukaan

Rev

Rev 28134 | Rev 29951 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
28102 tejbeer 1
$(function() {
2
	$(document).on('click', ".price-circular", function() {
3
		loadPriceCircular("main-content");
4
	});
5
 
6
	$(document).on('click', ".partner-price-circular", function() {
28134 tejbeer 7
 
8
		bootbox.confirm({
9
			message: "<div class = 'disclosurehindata'> <img src='resources/images/disclosure.png' style='width:100%'> </div>"
10
			,
11
			buttons: {
12
				confirm: {
13
					label: 'I agree',
14
					className: 'btn-success'
15
				},
16
				cancel: {
17
					label: 'I disagree',
18
					className: 'btn-danger'
19
				}
20
			},
21
			callback: function(result) {
22
				if (result == true) {
23
					loadPartnerPriceCircular("main-content");
24
				}
25
			}
26
		});
27
 
28102 tejbeer 28
	});
29
 
28142 tejbeer 30
 
31
	$(document).on('click', ".circular-request", function() {
32
		var brand = $(".criteria-item-brands").val();
33
		var partnerType = $("#partnerType").val();
34
		doGetAjaxRequestHandler(context + "/priceCircularByBrandAndPartnerType?brands=" + brand + "&partnerType=" +
35
			partnerType,
36
			function(response) {
37
				console.log(response)
38
				$('.circular-container').html(response);
39
			});
28102 tejbeer 40
	});
41
 
42
	$(document).on('click', ".submit-circular-request", function() {
43
		var brand = $("#brands").val();
44
		doGetAjaxRequestHandler(context + "/priceCircularByBrand?brand=" + brand,
45
			function(response) {
46
				console.log(response)
47
				$('.price-circular-container').html(response);
48
			});
49
	});
50
 
51
 
52
 
53
});
54
 
55
function loadPriceCircular(domId) {
56
	doGetAjaxRequestHandler(context + "/priceCircular",
57
		function(response) {
58
			$('#' + domId).html(response);
59
		});
60
}
61
 
62
function loadPartnerPriceCircular(domId) {
63
	doGetAjaxRequestHandler(context + "/partnerPriceCircular",
64
		function(response) {
65
			$('#' + domId).html(response);
66
		});
67
}