Subversion Repositories SmartDukaan

Rev

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

Rev 28102 Rev 28474
Line 26... Line 26...
26
		nonSelectedText : 'Items',
26
		nonSelectedText : 'Items',
27
		nSelectedText : ' - Items Selected',
27
		nSelectedText : ' - Items Selected',
28
		allSelectedText : 'All Items Selected',
28
		allSelectedText : 'All Items Selected',
29
		enableFiltering : true,
29
		enableFiltering : true,
30
		enableCaseInsensitiveFiltering : true,
30
		enableCaseInsensitiveFiltering : true,
-
 
31
	    onChange: function(option, checked) {
-
 
32
              // Get selected options.
-
 
33
              var selectedOptions = jQuery('.criteria-item-catalogids option:selected');
-
 
34
 
-
 
35
              if (selectedOptions.length >= 5) {
-
 
36
                  // Disable all other checkboxes.
-
 
37
                  var nonSelectedOptions = jQuery('.criteria-item-catalogids option').filter(function() {
-
 
38
                      return !jQuery(this).is(':selected');
-
 
39
                  });
-
 
40
 
-
 
41
                  nonSelectedOptions.each(function() {
-
 
42
                      var input = jQuery('input[value="' + jQuery(this).val() + '"]');
-
 
43
                      input.prop('disabled', true);
-
 
44
                      input.parent('li').addClass('disabled');
-
 
45
                  });
-
 
46
              }
-
 
47
              else {
-
 
48
                  // Enable all checkboxes.
-
 
49
                  $('.criteria-item-catalogids option').each(function() {
-
 
50
                      var input = jQuery('input[value="' + jQuery(this).val() + '"]');
-
 
51
                      input.prop('disabled', false);
-
 
52
                      input.parent('li').addClass('disabled');
-
 
53
                  });
-
 
54
              }
-
 
55
          }
31
	});
56
	});
-
 
57
          
-
 
58
 
-
 
59
	
32
</script>
60
</script>
33
 
61
 
34
<section class="wrapper">
62
<section class="wrapper">
35
	<div class="row">
63
	<div class="row">
36
		<div class="col-lg-12">
64
		<div class="col-lg-12">