Subversion Repositories SmartDukaan

Rev

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

Rev 27754 Rev 27755
Line 4... Line 4...
4
	});
4
	});
5
	$(document).on('click', ".add-brand", function() {
5
	$(document).on('click', ".add-brand", function() {
6
		loadaddBrandToService("main-content");
6
		loadaddBrandToService("main-content");
7
	});
7
	});
8
 
8
 
9
	$(".notApplicableService").live(
9
	$(document).on('click', ".notApplicableService",
10
			'click',
-
 
11
			function() {
10
			function() {
12
				naCommentService = $(this).data('nacommentservice');
11
				naCommentService = $(this).data('nacommentservice');
13
				console.log(naCommentService);
12
				console.log(naCommentService);
14
				var dialog = bootbox.dialog({
13
				var dialog = bootbox.dialog({
15
					message : "<h4 style='color:red'>NOTAPPLICABLE</h4><p>"
14
					message : "<h4 style='color:red'>NOTAPPLICABLE</h4><p>"
Line 17... Line 16...
17
					closeButton : true
16
					closeButton : true
18
				});
17
				});
19
				dialog.modal('show');
18
				dialog.modal('show');
20
 
19
 
21
			});
20
			});
22
	$(".notApplicableBrandService").live(
21
	$(document).on('click', ".notApplicableBrandService",
23
			'click',
-
 
24
			function() {
22
			function() {
25
				naCommentService = $(this).data('nacommentservice');
23
				naCommentService = $(this).data('nacommentservice');
26
				console.log(naCommentService);
24
				console.log(naCommentService);
27
				var dialog = bootbox.dialog({
25
				var dialog = bootbox.dialog({
28
					message : "<h4 style='color:red'>NOTAPPLICABLE</h4><p>"
26
					message : "<h4 style='color:red'>NOTAPPLICABLE</h4><p>"
Line 33... Line 31...
33
 
31
 
34
			});
32
			});
35
	$(document).on('click', ".add-brand", function() {
33
	$(document).on('click', ".add-brand", function() {
36
		loadaddBrandToService("main-content");
34
		loadaddBrandToService("main-content");
37
	});
35
	});
38
	$(".add-service-details-for-partner").live(
36
	$(document).on('click', ".add-service-details-for-partner",
39
			'click',
-
 
40
			function() {
37
			function() {
41
				fofoId = $("#partnerName").val();
38
				fofoId = $("#partnerName").val();
42
				serviceId = $("#serviceName").val();
39
				serviceId = $("#serviceName").val();
43
				applicableType = $("#applicableService").val();
40
				applicableType = $("#applicableService").val();
44
				code = $("#code").val();
41
				code = $("#code").val();
Line 86... Line 83...
86
					addPartnerServiceDetails(fofoId, serviceId, applicableType,
83
					addPartnerServiceDetails(fofoId, serviceId, applicableType,
87
							code, partnerStatus, na_comment,
84
							code, partnerStatus, na_comment,
88
							partnerCommentStatus);
85
							partnerCommentStatus);
89
				
86
				
90
			});
87
			});
91
	$(".add-brand-service-details-for-partner").live(
88
	$(document).on('click', ".add-brand-service-details-for-partner",
92
			'click',
-
 
93
			function() {
89
			function() {
94
				fofoId = $("#partnerName").val();
90
				fofoId = $("#partnerName").val();
95
				serviceId = $("#serviceName").val();
91
				serviceId = $("#serviceName").val();
96
				serviceBrandId = $("#serviceBrandName").val();
92
				serviceBrandId = $("#serviceBrandName").val();
97
				applicableType = $("#applicableService").val();
93
				applicableType = $("#applicableService").val();
Line 176... Line 172...
176
		console.log(serviceBrandId);
172
		console.log(serviceBrandId);
177
		deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId);
173
		deActivatePartnerBrandService(fofoId, serviceId, serviceBrandId);
178
 
174
 
179
	});
175
	});
180
 
176
 
181
	$(".create-service-button")
177
	$(document).on('click', ".create-service-button",
182
			.live(
-
 
183
					'click',
-
 
184
					function() {
178
					function() {
185
						console.log("create-service-button clicked");
179
						console.log("create-service-button clicked");
186
						var serviceName = $('#createserviceName').val();
180
						var serviceName = $('#createserviceName').val();
187
						if (serviceName === "" || serviceName === undefined
181
						if (serviceName === "" || serviceName === undefined
188
								|| serviceName == null) {
182
								|| serviceName == null) {
Line 191... Line 185...
191
						}
185
						}
192
						if (confirm("Are you sure you want to create Service!") == true) {
186
						if (confirm("Are you sure you want to create Service!") == true) {
193
							createService("main-content", serviceName);
187
							createService("main-content", serviceName);
194
						}
188
						}
195
					});
189
					});
196
	$(".partner-service-search-button").live(
190
	$(document).on('click', ".partner-service-search-button",
197
			'click',
-
 
198
			function() {
191
			function() {
199
				var fofoId = $('#partnerName').val();
192
				var fofoId = $('#partnerName').val();
200
				if (fofoId === "" || fofoId === undefined || fofoId == null) {
193
				if (fofoId === "" || fofoId === undefined || fofoId == null) {
201
					alert("select appropriate partner");
194
					alert("select appropriate partner");
202
					return;
195
					return;
Line 204... Line 197...
204
				doGetAjaxRequestHandler(context + "/getPartnerServices?fofoId="
197
				doGetAjaxRequestHandler(context + "/getPartnerServices?fofoId="
205
						+ fofoId, function(response) {
198
						+ fofoId, function(response) {
206
					$('#' + "partnerServicesByID").html(response);
199
					$('#' + "partnerServicesByID").html(response);
207
				});
200
				});
208
			});
201
			});
209
	$("#remove-added-brand-button")
202
	$(document).on('click', "#remove-added-brand-button",
210
			.live(
-
 
211
					'click',
-
 
212
					function() {
203
					function() {
213
						var serviceId = $(this).data('id');
204
						var serviceId = $(this).data('id');
214
						var brand = $(this).data('brand');
205
						var brand = $(this).data('brand');
215
						console.log(serviceId);
206
						console.log(serviceId);
216
						console.log(brand)
207
						console.log(brand)