Subversion Repositories SmartDukaan

Rev

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

Rev 28474 Rev 28477
Line 16... Line 16...
16
	$('.chosen-select').chosen({
16
	$('.chosen-select').chosen({
17
		search_contains : true
17
		search_contains : true
18
 
18
 
19
	});
19
	});
20
 
20
 
21
	$('.criteria-item-catalogids').multiselect({
21
	$('.criteria-item-catalogids')
22
		includeSelectAllOption : true,
22
			.multiselect(
-
 
23
					{
23
		maxHeight : 400,
24
						maxHeight : 400,
24
		buttonWidth : '240px',
25
						numberDisplayed : 1,
25
		numberDisplayed : 1,
26
						selectAll : false,
26
		nonSelectedText : 'Items',
27
						nonSelectedText : 'Items Selected',
27
		nSelectedText : ' - Items Selected',
28
						nSelectedText : ' - Items Selected',
28
		allSelectedText : 'All Items Selected',
29
						allSelectedText : 'All Items Selected',
29
		enableFiltering : true,
30
						enableFiltering : true,
30
		enableCaseInsensitiveFiltering : true,
31
						enableCaseInsensitiveFiltering : true,
31
	    onChange: function(option, checked) {
32
						onChange : function(option, checked) {
32
              // Get selected options.
33
							// Get selected options.
33
              var selectedOptions = jQuery('.criteria-item-catalogids option:selected');
34
							var selectedOptions = jQuery('.criteria-item-catalogids option:selected');
34
 
35
 
35
              if (selectedOptions.length >= 5) {
36
							if (selectedOptions.length >= 5) {
36
                  // Disable all other checkboxes.
37
								// Disable all other checkboxes.
-
 
38
								var nonSelectedOptions = jQuery(
37
                  var nonSelectedOptions = jQuery('.criteria-item-catalogids option').filter(function() {
39
										'.criteria-item-catalogids option')
-
 
40
										.filter(
-
 
41
												function() {
38
                      return !jQuery(this).is(':selected');
42
													return !jQuery(this).is(
-
 
43
															':selected');
39
                  });
44
												});
40
 
45
 
41
                  nonSelectedOptions.each(function() {
46
								nonSelectedOptions.each(function() {
42
                      var input = jQuery('input[value="' + jQuery(this).val() + '"]');
47
									var input = jQuery('input[value="'
-
 
48
											+ jQuery(this).val() + '"]');
43
                      input.prop('disabled', true);
49
									input.prop('disabled', true);
44
                      input.parent('li').addClass('disabled');
50
									input.parent('li').addClass('disabled');
45
                  });
-
 
46
              }
51
								});
47
              else {
52
							} else {
48
                  // Enable all checkboxes.
53
								// Enable all checkboxes.
49
                  $('.criteria-item-catalogids option').each(function() {
54
								$('.criteria-item-catalogids option')
-
 
55
										.each(
-
 
56
												function() {
50
                      var input = jQuery('input[value="' + jQuery(this).val() + '"]');
57
													var input = jQuery('input[value="'
-
 
58
															+ jQuery(this)
-
 
59
																	.val()
-
 
60
															+ '"]');
51
                      input.prop('disabled', false);
61
													input.prop('disabled',
-
 
62
															false);
52
                      input.parent('li').addClass('disabled');
63
													input.parent('li')
53
                  });
64
															.addClass(
54
              }
65
																	'disabled');
55
          }
66
												});
56
	});
67
							}
57
          
68
						}
58
 
-
 
59
	
69
					});
60
</script>
70
</script>
61
 
71
 
62
<section class="wrapper">
72
<section class="wrapper">
63
	<div class="row">
73
	<div class="row">
64
		<div class="col-lg-12">
74
		<div class="col-lg-12">
Line 142... Line 152...
142
						<option value="$brand">$brand</option> #end
152
						<option value="$brand">$brand</option> #end
143
					</select>
153
					</select>
144
				</div>
154
				</div>
145
			</div>
155
			</div>
146
 
156
 
147
			<div class="col-lg-2">
157
			<div class="col-lg-1">
148
				<div class="row col-lg-12 form-group" style="margin-top: 22px">
158
				<div class="row col-lg-12 form-group" style="margin-top: 22px">
149
					<select class="criteria-item-catalogids form-control"
159
					<select class="criteria-item-catalogids form-control"
150
						multiple="multiple"></select>
160
						multiple="multiple"></select>
151
				</div>
161
				</div>
152
			</div>
162
			</div>
153
 
163
 
-
 
164
			<div class="col-lg-2">
-
 
165
				<div class="row col-lg-12 form-group" style="margin-top: 22px">
-
 
166
 
-
 
167
					<select class="form-control input-sm" id="warehouseMap"
-
 
168
						name="warehouseMap" placeholder="Warehouse">
-
 
169
						<option value="" disabled selected>Warehouse</option>
-
 
170
						<option value="0" selected>All</option> #foreach($wm in
-
 
171
						$warehouseMap.entrySet()))
-
 
172
 
-
 
173
						<option value="$wm.getKey()">$wm.getValue()</option> #end
-
 
174
					</select>
-
 
175
				</div>
-
 
176
			</div>
154
 
177
 
155
 
178
 
156
			<div class="col-lg-2">
179
			<div class="col-lg-2">
157
				<div class="row col-lg-12 form-group" style="margin-top: 21px">
180
				<div class="row col-lg-12 form-group" style="margin-top: 21px">
158
 
181
 
159
					<button class="btn btn-primary search-partner-stock" type="button">
182
					<button class="btn btn-primary search-partner-stock" type="button">Search</button>
160
						Search</button>
-
 
161
 
183
 
162
				</div>
184
				</div>
163
			</div>
185
			</div>
164
		</div>
186
		</div>
165
 
187