summaryrefslogtreecommitdiffstats
path: root/js/jquery.multi-select.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/jquery.multi-select.js')
-rw-r--r--js/jquery.multi-select.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/js/jquery.multi-select.js b/js/jquery.multi-select.js
index f89147c..3fead7f 100644
--- a/js/jquery.multi-select.js
+++ b/js/jquery.multi-select.js
@@ -173,8 +173,10 @@
selectedLi = selectedUl.children('li[ms-value="'+value+'"]');
var parentOptgroup = selectableLi.parent('.ms-optgroup');
- if (parentOptgroup.length > 0)
- parentOptgroup.children('.ms-optgroup-label').show();
+ if (parentOptgroup.length > 0){
+ parentOptgroup.children('.ms-optgroup-label').addClass('collapse').show();
+ parentOptgroup.children('.ms-elem-selectable:not(.ms-selected)').show();
+ }
selectedOption.removeAttr('selected');
selectableLi.show();
selectableLi.removeClass('ms-selected');
@@ -193,6 +195,7 @@
},
'select_all' : function(){
var ms = this;
+ console.log(ms);
ms.find("option:not(option[value=''])").each(function(){
ms.multiSelect('select', $(this).val(), 'select_all');
});