Skip to content
Snippets Groups Projects
Commit 949cab7e authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Add new group to other user's group select forms

parent 5121c262
No related branches found
No related tags found
No related merge requests found
......@@ -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());
}
}
});
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment