Commit 8f69ae16 authored by David Stutz's avatar David Stutz

Example for #570.

parent 0139b3ee
......@@ -338,6 +338,7 @@
selectAllValue: 'multiselect-all',
selectAllName: false,
selectAllNumber: true,
selectAllJustVisible: true,
enableFiltering: false,
enableCaseInsensitiveFiltering: false,
enableFullValueFiltering: false,
......@@ -353,7 +354,6 @@
numberDisplayed: 3,
disableIfEmpty: false,
delimiterText: ', ',
justVisible: true,
templates: {
button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span> <b class="caret"></b></button>',
ul: '<ul class="multiselect-container dropdown-menu"></ul>',
......@@ -503,10 +503,10 @@
if (isSelectAllOption) {
if (checked) {
this.selectAll(this.options.justVisible);
this.selectAll(this.options.selectAllJustVisible);
}
else {
this.deselectAll(this.options.justVisible);
this.deselectAll(this.options.selectAllJustVisible);
}
}
......
......@@ -1801,6 +1801,49 @@
});
});
&lt;/script&gt;
</pre>
</div>
</td>
</tr>
<tr>
<td>
<code>selectAllJustVisible</code>
</td>
<td>
<p>
Setting both <code>includeSelectAllOption</code> and <code>enableFiltering</code> to <code>true</code>, the select all option does always select only the visible option. With setting <code>selectAllJustVisible</code> to <code>false</code> this behavior is changed such that always all options (irrespective of whether they are visible) are selected.
</p>
<div class="example">
<script type="text/javascript">
$(document).ready(function() {
$('#example-selectAllJustVisible').multiselect({
enableFiltering: true,
includeSelectAllOption: true,
selectAllJustVisible: false
});
});
</script>
<select id="example-selectAllJustVisible" multiple="multiple">
<option value="1">Option 1</option>
<option value="2">Option 2</option>
<option value="3">Option 3</option>
<option value="4">Option 4</option>
<option value="5">Option 5</option>
<option value="6">Option 6</option>
</select>
</div>
<div class="highlight">
<pre class="prettyprint linenums">
&lt;script type=&quot;text/javascript&quot;&gt;
$(document).ready(function() {
$('#example-selectAllJustVisible').multiselect({
enableFiltering: true,
includeSelectAllOption: true,
selectAllJustVisible: false
});
});
&lt;/script&gt;
</pre>
</div>
</td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment