Subversion Repositories SmartDukaan

Rev

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

Rev 28381 Rev 28723
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
		
-
 
5
	if(brandSelect == 1)
-
 
6
		{
-
 
7
		
4
		var brand = $('#block-brand').val();
8
		var brand = $('#block-brand').val();
5
		var fofoIds = $('#selected-block-ids').val();
9
		var fofoIds = $('#selected-block-ids').val();
-
 
10
		console.log("fofoIds"+fofoIds);
6
		if (confirm("Are you sure you want to submit") == true) {
11
		if (confirm("Are you sure you want to submit") == true) {
7
			doPostAjaxRequestHandler(context + "/getRetailerBlockBrandMappping?brand=" + brand + "&fofoIds=" + fofoIds,
12
			doPostAjaxRequestHandler(context + "/getRetailerBlockBrandMappping?brand=" + brand + "&fofoIds=" + fofoIds,
8
				function(response) {
13
				function(response) {
9
					if (response = true) {
14
					if (response = true) {
10
 
15
 
11
						alert("Successfully Submitted");
16
						alert("Successfully Submitted");
12
						$("button.block-brand-submit").click();
17
						$("button.block-brand-submit").click();
13
					}
18
					}
14
				});
19
				});
15
		}
20
		}
-
 
21
      }
-
 
22
	
-
 
23
	else 
-
 
24
		{
-
 
25
		
-
 
26
		alert("Please click submit button of selected brand");
-
 
27
		}
16
	});
28
	});
17
 
29
 
-
 
30
	var brandSelect;
18
 
31
	
-
 
32
	$(document).on('change', ".brand-select", function() {
-
 
33
		brandSelect=0;
-
 
34
		console.log(brandSelect);
-
 
35
		 
-
 
36
		 
-
 
37
		});
-
 
38
	
19
 
39
 
20
	$(document).on('click', '.block-brand-submit', function() {
40
	$(document).on('click', '.block-brand-submit', function() {
21
 
41
 
22
		var brand = $('#block-brand').val();
42
		var brand = $('#block-brand').val();
23
 
-
 
24
 
-
 
-
 
43
       brandSelect = 1;
-
 
44
console.log(brandSelect);
25
		doGetAjaxRequestHandler(context + "/getBlockBrand?brand=" + brand,
45
		doGetAjaxRequestHandler(context + "/getBlockBrand?brand=" + brand,
26
			function(response) {
46
			function(response) {
27
				$('.partnersbyblockbrands').html(response);
47
				$('.partnersbyblockbrands').html(response);
28
			});
48
			});
29
 
49