diff --git a/dist/js/bootstrap-multiselect.js b/dist/js/bootstrap-multiselect.js
index 2a028b77..cb1c5311 100644
--- a/dist/js/bootstrap-multiselect.js
+++ b/dist/js/bootstrap-multiselect.js
@@ -445,8 +445,9 @@
filterClearBtn: '',
li: '
',
divider: '',
- liGroup: '',
resetButton: ''
+ liGroup: '',
+ liGroupCaret: ''
}
},
@@ -945,7 +946,8 @@
createOptgroup: function(group) {
var label = $(group).attr("label");
var value = $(group).attr("value");
- var $li = $('');
+ var ipclass = $(group).attr("class");
+ var $li = $(this.options.templates.liGroup);
var classes = this.options.optionClass(group);
$li.addClass(classes);
@@ -958,11 +960,11 @@
}
if (this.options.enableCollapsibleOptGroups && this.options.multiple) {
- $('a', $li).append('');
+ $('a', $li).append(this.options.templates.liGroupCaret);
}
if (this.options.enableClickableOptGroups && this.options.multiple) {
- $('a label', $li).prepend('');
+ $('a label', $li).prepend('');
}
if ($(group).is(':disabled')) {
@@ -1617,14 +1619,19 @@
.not('.disabled');
var checked = true;
+ var checkedCount = 0;
$options.each(function() {
var $input = $('input', this);
if (!$input.prop('checked')) {
checked = false;
+ } else {
+ checkedCount++;
}
});
+ $('input', this).prop('indeterminate', (!checked && checkedCount > 0));
+
if (selectedClass) {
if (checked) {
$(this).addClass(selectedClass);