Commit bcace11e authored by David Stutz's avatar David Stutz

#368, #393, tests and documentation.

parent e0a994a0
...@@ -657,6 +657,10 @@ ...@@ -657,6 +657,10 @@
* Checks if a select all has already been created. * Checks if a select all has already been created.
*/ */
buildSelectAll: function() { buildSelectAll: function() {
if (typeof this.options.selectAllValue === 'number') {
this.options.selectAllValue = this.options.selectAllValue.toString();
}
var alreadyHasSelectAll = this.hasSelectAll(); var alreadyHasSelectAll = this.hasSelectAll();
if (!alreadyHasSelectAll && this.options.includeSelectAllOption && this.options.multiple if (!alreadyHasSelectAll && this.options.includeSelectAllOption && this.options.multiple
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
<li><a href="#post">Server-Side Processing</a></li> <li><a href="#post">Server-Side Processing</a></li>
<li><a href="#keyboard-support">Keyboard Support</a> <li><a href="#keyboard-support">Keyboard Support</a>
<li><a href="#faq">Frequently Asked Questions</a></li> <li><a href="#faq">Frequently Asked Questions</a></li>
<li><a href="#known-issues">Known Issues</a></li>
<li><a href="tests/SpecRunner.html">Tests</a></li>
<li><a href="#license">License</a></li> <li><a href="#license">License</a></li>
</ul> </ul>
</div> </div>
...@@ -46,7 +48,7 @@ ...@@ -46,7 +48,7 @@
</div> </div>
<p class="alert alert-info"> <p class="alert alert-info">
Tests are available <a href="http://davidstutz.github.io/bootstrap-multiselect/tests/SpecRunner.html">here</a> using the <a href="http://jasmine.github.io/" target="_blank">Jasmine Testing Framework</a>. <b>Please see <a href="#known-issues">Known Issues</a>.</b>
</p> </p>
<p class="alert alert-info"> <p class="alert alert-info">
...@@ -54,10 +56,6 @@ ...@@ -54,10 +56,6 @@
</p> </p>
<p class="alert alert-info"> <p class="alert alert-info">
<b>The demonstration page for Twitter Bootstrap 2.3 was removed. Nevertheless, this page should work using Twitter Bootstrap 2.3 except for some methods which are marked accordingly.</b>
</p>
<p class="alert alert-warning">
<b>Please have a look on <a href="#how-to-contribute">How to contribute?</a> and the <a href="https://github.com/davidstutz/bootstrap-multiselect/issues">Issue Tracker</a>.</b> <b>Please have a look on <a href="#how-to-contribute">How to contribute?</a> and the <a href="https://github.com/davidstutz/bootstrap-multiselect/issues">Issue Tracker</a>.</b>
</p> </p>
...@@ -1421,6 +1419,39 @@ ...@@ -1421,6 +1419,39 @@
}); });
}); });
&lt;/script&gt; &lt;/script&gt;
</pre>
</div>
<p>The <code>selectAllValue</code> option should usually be a string, however, numeric values work as well:</p>
<div class="example">
<script type="text/javascript">
$(document).ready(function() {
$('#example-selectAllValue-numeric').multiselect({
includeSelectAllOption: true,
selectAllValue: 0
});
});
</script>
<select id="example-selectAllValue-numeric" 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-selectAllValue-numeric').multiselect({
includeSelectAllOption: true,
selectAllValue: 0
});
});
&lt;/script&gt;
</pre> </pre>
</div> </div>
</td> </td>
...@@ -2491,20 +2522,12 @@ ...@@ -2491,20 +2522,12 @@
$(document).ready(function() { $(document).ready(function() {
var firstConfigurationSet = { var firstConfigurationSet = {
selectAll: { includeSelectAllOption: false,
enabled: false enableFiltering: false
},
filter: {
enabled: false
}
}; };
var secondConfigurationSet = { var secondConfigurationSet = {
selectAll: { includeSelectAllOption: false,
enabled: true enableFiltering: true
},
filter: {
enabled: true
}
}; };
var set = 1; var set = 1;
...@@ -2553,20 +2576,12 @@ ...@@ -2553,20 +2576,12 @@
$(document).ready(function() { $(document).ready(function() {
var firstConfigurationSet = { var firstConfigurationSet = {
selectAll: { includeSelectAllOption: false,
enabled: false enableFiltering: false
},
filter: {
enabled: false
}
}; };
var secondConfigurationSet = { var secondConfigurationSet = {
selectAll: { includeSelectAllOption: false,
enabled: true enableFiltering: true
},
filter: {
enabled: true
}
}; };
var set = 1; var set = 1;
...@@ -3844,6 +3859,27 @@ $('.multiselect').multiselect({ ...@@ -3844,6 +3859,27 @@ $('.multiselect').multiselect({
<dd> <dd>
This issue is discussed in <a href="https://github.com/davidstutz/bootstrap-multiselect/issues/271">#271.</a> This issue is discussed in <a href="https://github.com/davidstutz/bootstrap-multiselect/issues/271">#271.</a>
</dd> </dd>
<dt>Esc does not close the dropdown?!</dt>
<dd>
This issue is discussed in <a href="https://github.com/davidstutz/bootstrap-multiselect/issues/368">#368</a>. Currently, pressing <code>Esc</code> will not close the dropdown as there were some bugs with this.
</dd>
</dl>
<div class="page-header">
<h2 id="known-issues">Known Issues</h2>
</div>
<dl>
<dt>Slow dropdown on Chrome 35.</dt>
<dd>
As discussed in <a href="https://github.com/davidstutz/bootstrap-multiselect/issues/268">#268</a>, certain versions seem to have some performance problems, especially Chrome 35.0.1916.114m.
</dd>
<dt>Using <code>maxHeight</code> results in the filter being not fixed at the top.</dt>
<dd>
See issue <a href="https://github.com/davidstutz/bootstrap-multiselect/issues/396"></a>. Pull requests are welcome.
</dd>
</dl> </dl>
<div class="page-header"> <div class="page-header">
......
This diff is collapsed.
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