diff options
author | Marvin Thomas Rabe <m.rabe@echtzeitraum.de> | 2011-10-02 15:38:07 +0200 |
---|---|---|
committer | Marvin Thomas Rabe <m.rabe@echtzeitraum.de> | 2011-10-02 15:38:07 +0200 |
commit | 41dfce150d62701e54c29cf252fe450dd82b1ab5 (patch) | |
tree | 189a81b543b3ba96f80061a88afeeae57627bff2 /core | |
parent | 5a40804773a98f8171762315103738dfc01310da (diff) | |
download | nextcloud-server-41dfce150d62701e54c29cf252fe450dd82b1ab5.tar.gz nextcloud-server-41dfce150d62701e54c29cf252fe450dd82b1ab5.zip |
problem with previous selected groups fixed
Diffstat (limited to 'core')
-rw-r--r-- | core/js/multiselect.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/js/multiselect.js b/core/js/multiselect.js index 559cdf9b167..26380824047 100644 --- a/core/js/multiselect.js +++ b/core/js/multiselect.js @@ -43,25 +43,25 @@ }); button.addClass('active'); event.stopPropagation(); - var options=$(this).parent().next().children().map(function(){return $(this).val()}); + var options=$(this).parent().next().children().map(function(){return $(this).val();}); var list=$('<ul class="multiselectoptions"/>').hide().appendTo($(this).parent()); function createItem(item,checked){ var id='ms'+multiSelectId+'-option-'+item; var input=$('<input id="'+id+'" type="checkbox"/>'); var label=$('<label for="'+id+'">'+item+'</label>'); if(settings.checked.indexOf(item)!=-1 || checked){ - input.attr('checked','checked'); + input.attr('checked',true); } if(checked){ settings.checked.push(item); } input.change(function(){ var groupname=$(this).next().text(); - if($(this).attr('checked')){ + if($(this).is(':checked')){ settings.checked.push(groupname); if(settings.oncheck){ if(settings.oncheck(groupname)===false){ - $(this).removeAttr('checked'); + $(this).attr('checked', false); return; } } @@ -70,7 +70,7 @@ settings.checked.splice(index,1); if(settings.onuncheck){ if(settings.onuncheck(groupname)===false){ - $(this).attr('checked','checked'); + $(this).attr('checked',true); return; } } @@ -81,7 +81,7 @@ }else{ button.children('span').first().text(settings.title); } - var newOuterWidth=Math.max((button.outerWidth()-2),settings.minOuterWidth)+'px' + var newOuterWidth=Math.max((button.outerWidth()-2),settings.minOuterWidth)+'px'; var newWidth=Math.max(button.width(),settings.minWidth); button.css('height',button.height()); button.css('white-space','nowrap'); |