Commit da226707 authored by David Stutz's avatar David Stutz

Fixed #578: disabledText option including documentation.

parent e5f768c1
...@@ -230,7 +230,13 @@ ...@@ -230,7 +230,13 @@
* @returns {String} * @returns {String}
*/ */
buttonText: function(options, select) { buttonText: function(options, select) {
if (options.length === 0) { if (this.disabledText.length > 0
&& (this.disableIfEmpty || select.prop('disabled'))
&& options.length == 0) {
return this.disabledText;
}
else if (options.length === 0) {
return this.nonSelectedText; return this.nonSelectedText;
} }
else if (this.allSelectedText else if (this.allSelectedText
...@@ -390,6 +396,7 @@ ...@@ -390,6 +396,7 @@
allSelectedText: 'All selected', allSelectedText: 'All selected',
numberDisplayed: 3, numberDisplayed: 3,
disableIfEmpty: false, disableIfEmpty: false,
disabledText: '',
delimiterText: ', ', delimiterText: ', ',
templates: { templates: {
button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span> <b class="caret"></b></button>', button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"><span class="multiselect-selected-text"></span> <b class="caret"></b></button>',
......
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