Subversion Repositories SmartDukaan

Rev

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

Rev 14975 Rev 15015
Line 519... Line 519...
519
	e.preventDefault();
519
	e.preventDefault();
520
	$('.notificationmodal').modal('hide');
520
	$('.notificationmodal').modal('hide');
521
	setTimeout(function(){ $('.notificationmodal').modal('hide'); }, 1000);
521
	setTimeout(function(){ $('.notificationmodal').modal('hide'); }, 1000);
522
	ga('send', 'event', 'popupnotification', 'ok', me);
522
	ga('send', 'event', 'popupnotification', 'ok', me);
523
	document.location = $(this).parent().prop('href');
523
	document.location = $(this).parent().prop('href');
524
})
-
 
525
524
});
-
 
525
$(document).on('click','.clearfilter',function(){	
-
 
526
	$('.filterbrand').each(function(){
-
 
527
		$(this).prop('checked',false);
-
 
528
	});	
-
 
529
});
-
 
530
$(document).on('click','.applyfilter',function(){	
-
 
531
	var brands = [];
-
 
532
	$('.filterbrand').each(function(){
-
 
533
		if($(this).prop('checked')){
-
 
534
			brands.push($(this).val());
-
 
535
		}		
-
 
536
	});
-
 
537
	if(brands.length==0){
-
 
538
		$('#message').html('Please choose a few brands first').removeClass('hidden');
-
 
539
		setTimeout(function(){ $('#message').addClass('hidden'); }, 3000);
-
 
540
		return false;
-
 
541
	}else{
-
 
542
		var url = $('#brandselecter').prop('action');
-
 
543
		document.location = url+'&brands='+brands.join('^');
-
 
544
	}	
-
 
545
});
-
 
546
$(document).on('click','#showallbrands',function(){	
-
 
547
	$('.hidden').removeClass('hidden');
-
 
548
	$(this).hide();
-
 
549
});
-
 
550
526
551