Subversion Repositories SmartDukaan

Rev

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

Rev 33622 Rev 33623
Line 186... Line 186...
186
$(document).on('click', 'select.criteria-catalogids+div > button', function() {
186
$(document).on('click', 'select.criteria-catalogids+div > button', function() {
187
	if (changed) {
187
	if (changed) {
188
		let brands = $(this).closest('.item-criteria').find('select').val();
188
		let brands = $(this).closest('.item-criteria').find('select').val();
189
		let led = $(this).closest('.item-criteria').find('input[name=led]').is(":checked");
189
		let led = $(this).closest('.item-criteria').find('input[name=led]').is(":checked");
190
		let tablet = $(this).closest('.item-criteria').find('input[name=tablet]').is(":checked");
190
		let tablet = $(this).closest('.item-criteria').find('input[name=tablet]').is(":checked");
-
 
191
		let smartWatch = $(this).closest('.item-criteria').find('input[name=smartwatch]').is(":checked");
191
		$brandsContainer = $(this);
192
		$brandsContainer = $(this);
192
		let categoryId = 3;
193
		let categoryId = 3;
193
		if (led) {
194
		if (led) {
194
			categoryId = 14202;
195
			categoryId = 14202;
195
		}
196
		}
196
		if(tablet) {
197
		if(tablet) {
197
			categoryId = 10010;
198
			categoryId = 10010;
198
		}
199
		}
-
 
200
		if(tablet) {
-
 
201
			categoryId = 10010;
-
 
202
		}
-
 
203
		if(smartWatch) {
-
 
204
			categoryId = 12101;
-
 
205
		}
199
		var url = `${context}/entity?brands=${brands.join(",")}&categoryId=${categoryId}&limit=0`;
206
		var url = `${context}/entity?brands=${brands.join(",")}&categoryId=${categoryId}&limit=0`;
200
		$select = $brandsContainer.closest('.item-criteria').find('.criteria-catalogids');
207
		$select = $brandsContainer.closest('.item-criteria').find('.criteria-catalogids');
201
		$select.html('');
208
		$select.html('');
202
		if (brands.length > 0) {
209
		if (brands.length > 0) {
203
			doGetAjaxRequestHandler(url, function (response) {
210
			doGetAjaxRequestHandler(url, function (response) {