summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/application.js2
-rw-r--r--js/jquery.multi-select.js7
2 files changed, 6 insertions, 3 deletions
diff --git a/js/application.js b/js/application.js
index d2dbaae..fb9b7ec 100644
--- a/js/application.js
+++ b/js/application.js
@@ -8,7 +8,7 @@
$(this).nextAll('li').hide();
$(this).removeClass('collapse');
} else {
- $(this).nextAll('li').show();
+ $(this).nextAll('li:not(.ms-selected)').show();
$(this).addClass('collapse');
}
});
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');
});