summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/js/multiselect.js5
-rw-r--r--settings/js/users.js6
2 files changed, 9 insertions, 2 deletions
diff --git a/core/js/multiselect.js b/core/js/multiselect.js
index db5afa637c9..ba89c1bb563 100644
--- a/core/js/multiselect.js
+++ b/core/js/multiselect.js
@@ -35,6 +35,7 @@
}
button.click(function(event){
+
var button=$(this);
if(button.parent().children('ul').length>0){
button.parent().children('ul').slideUp(400,function(){
@@ -136,11 +137,11 @@
var option=$('<option selected="selected"/>');
option.attr('value',$(this).val());
option.text($(this).val());
- select.append(options);
+ select.append(option);
li.prev().children('input').trigger('click');
button.parent().data('preventHide',false);
if(settings.createCallback){
- settings.createCallback();
+ settings.createCallback($(this).val());
}
}
});
diff --git a/settings/js/users.js b/settings/js/users.js
index 0de0d1df3bc..18f4e9f209c 100644
--- a/settings/js/users.js
+++ b/settings/js/users.js
@@ -40,7 +40,13 @@ $(document).ready(function(){
}else{
checkHandeler=false;
}
+ var addGroup = function(group) {
+ $('select[multiple]').each(function(index, element) {
+ $(element).append('<option value="'+group+'">'+group+'</option>');
+ })
+ };
element.multiSelect({
+ createCallback:addGroup,
createText:'add group',
checked:checked,
oncheck:checkHandeler,