Subversion Repositories SmartDukaan

Rev

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

Rev 24329 Rev 27754
Line 1... Line 1...
1
$(function() {
1
$(function() {
2
	$(".create-service").live('click', function() {
2
	$(document).on('click', ".create-service", function() {
3
		loadService("main-content");
3
		loadService("main-content");
4
	});
4
	});
5
	$(".add-brand").live('click', function() {
5
	$(document).on('click', ".add-brand", function() {
6
		loadaddBrandToService("main-content");
6
		loadaddBrandToService("main-content");
7
	});
7
	});
8
 
8
 
9
	$(".notApplicableService").live(
9
	$(".notApplicableService").live(
10
			'click',
10
			'click',
Line 30... Line 30...
30
					closeButton : true
30
					closeButton : true
31
				});
31
				});
32
				dialog.modal('show');
32
				dialog.modal('show');
33
 
33
 
34
			});
34
			});
35
	$(".add-brand").live('click', function() {
35
	$(document).on('click', ".add-brand", function() {
36
		loadaddBrandToService("main-content");
36
		loadaddBrandToService("main-content");
37
	});
37
	});
38
	$(".add-service-details-for-partner").live(
38
	$(".add-service-details-for-partner").live(
39
			'click',
39
			'click',
40
			function() {
40
			function() {
Line 127... Line 127...
127
					addPartnerServiceBrandDetails(fofoId, serviceId,
127
					addPartnerServiceBrandDetails(fofoId, serviceId,
128
							serviceBrandId, applicableType, active,
128
							serviceBrandId, applicableType, active,
129
							partnerStatus, na_comment, partnerCommentStatus);
129
							partnerStatus, na_comment, partnerCommentStatus);
130
				}
130
				}
131
			});
131
			});
132
	$(".partner-service").live('click', function() {
132
	$(document).on('click', ".partner-service", function() {
133
		loadpartnerService("main-content");
133
		loadpartnerService("main-content");
134
	});
134
	});
135
	$(".admin-partner-service").live('click', function() {
135
	$(document).on('click', ".admin-partner-service", function() {
136
		loadAdminPartnerService("main-content", 0);
136
		loadAdminPartnerService("main-content", 0);
137
	});
137
	});
138
	$(".add-partner-service-details").live('click', function() {
138
	$(document).on('click', ".add-partner-service-details", function() {
139
		loadaddPartnerServiceDetails("main-content");
139
		loadaddPartnerServiceDetails("main-content");
140
	});
140
	});
141
	$(".add-partner-brand-service-details").live('click', function() {
141
	$(document).on('click', ".add-partner-brand-service-details", function() {
142
		loadaddPartnerBrandServiceDetails("main-content");
142
		loadaddPartnerBrandServiceDetails("main-content");
143
	});
143
	});
144
	$(".activate-service").live('click', function() {
144
	$(document).on('click', ".activate-service", function() {
145
		serviceId = $(this).data('serviceid');
145
		serviceId = $(this).data('serviceid');
146
		fofoId = $("#partnerName").val();
146
		fofoId = $("#partnerName").val();
147
		console.log(fofoId);
147
		console.log(fofoId);
148
		console.log(serviceId);
148
		console.log(serviceId);
149
		activatePartnerService(fofoId, serviceId);
149
		activatePartnerService(fofoId, serviceId);
150
	});
150
	});
151
	$(".deactivate-service").live('click', function() {
151
	$(document).on('click', ".deactivate-service", function() {
152
		serviceId = $(this).data('serviceid');
152
		serviceId = $(this).data('serviceid');
153
		fofoId = $("#partnerName").val();
153
		fofoId = $("#partnerName").val();
154
		console.log(fofoId);
154
		console.log(fofoId);
155
		console.log(serviceId);
155
		console.log(serviceId);
156
		deActivatePartnerService(fofoId, serviceId);
156
		deActivatePartnerService(fofoId, serviceId);
157
	});
157
	});
158
	$(".activate-brand-service").live('click', function() {
158
	$(document).on('click', ".activate-brand-service", function() {
159
		console.log("activate-brand-service clicked");
159
		console.log("activate-brand-service clicked");
160
		serviceId = $(this).data('serviceid');
160
		serviceId = $(this).data('serviceid');
161
		fofoId = $("#partnerName").val();
161
		fofoId = $("#partnerName").val();
162
		serviceBrandId = $(this).data('servicebrandid');
162
		serviceBrandId = $(this).data('servicebrandid');
163
		console.log(fofoId);
163
		console.log(fofoId);
164
		console.log(serviceId);
164
		console.log(serviceId);
165
		console.log(serviceBrandId);
165
		console.log(serviceBrandId);
166
		activatePartnerBrandService(fofoId, serviceId, serviceBrandId);
166
		activatePartnerBrandService(fofoId, serviceId, serviceBrandId);
167
 
167
 
168
	});
168
	});
169
	$(".deactivate-brand-service").live('click', function() {
169
	$(document).on('click', ".deactivate-brand-service", function() {
170
		console.log("activate-brand-service clicked");
170
		console.log("activate-brand-service clicked");
171
		serviceId = $(this).data('serviceid');
171
		serviceId = $(this).data('serviceid');
172
		fofoId = $("#partnerName").val();
172
		fofoId = $("#partnerName").val();
173
		serviceBrandId = $(this).data('servicebrandid');
173
		serviceBrandId = $(this).data('servicebrandid');
174
		console.log(fofoId);
174
		console.log(fofoId);
Line 217... Line 217...
217
						if (confirm("Are you sure you want to remove brand from Service!") == true) {
217
						if (confirm("Are you sure you want to remove brand from Service!") == true) {
218
							removeBrandFromService("main-content", serviceId,
218
							removeBrandFromService("main-content", serviceId,
219
									brand);
219
									brand);
220
						}
220
						}
221
					});
221
					});
222
	$(".service-brand-button").live('click', function() {
222
	$(document).on('click', ".service-brand-button", function() {
223
		var brands = $('#tag-listing-brands').val();
223
		var brands = $('#tag-listing-brands').val();
224
		var serviceId = $('#serviceName').val();
224
		var serviceId = $('#serviceName').val();
225
		console.log(brands);
225
		console.log(brands);
226
		console.log(serviceId);
226
		console.log(serviceId);
227
		if (serviceId === "" || serviceId === undefined) {
227
		if (serviceId === "" || serviceId === undefined) {
Line 234... Line 234...
234
		}
234
		}
235
		if (confirm("Are you sure you want to add brand!") == true) {
235
		if (confirm("Are you sure you want to add brand!") == true) {
236
			addBrandToService("main-content", brands, serviceId);
236
			addBrandToService("main-content", brands, serviceId);
237
		}
237
		}
238
	});
238
	});
239
	$('#serviceName').live('change', function() {
239
	$(document).on('change', '#serviceName', function() {
240
		// $('#tag-listing-brand-value').text($(this).text());
240
		// $('#tag-listing-brand-value').text($(this).text());
241
		loadBrandsByServiceId("service-container", $(this).val());
241
		loadBrandsByServiceId("service-container", $(this).val());
242
		loadaddedBrandsbyserviceId("added-brand-to-service", $(this).val())
242
		loadaddedBrandsbyserviceId("added-brand-to-service", $(this).val())
243
	});
243
	});
244
});
244
});