]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix inconsitent behaviour when trying to remove yourself from the admin group
authorRobin Appelman <icewind@owncloud.com>
Sat, 14 Jan 2012 23:49:48 +0000 (00:49 +0100)
committerRobin Appelman <icewind@owncloud.com>
Sat, 14 Jan 2012 23:50:01 +0000 (00:50 +0100)
core/js/multiselect.js

index 610e9193bb7fdb18d3d9b1a64b24cf06267e942d..96fc09a0759d57edf63ba32d9fd1fa2a3a22e3da 100644 (file)
                                input.change(function(){
                                        var groupname=$(this).next().text();
                                        if($(this).is(':checked')){
-                                               settings.checked.push(groupname);
                                                if(settings.oncheck){
                                                        if(settings.oncheck(groupname)===false){
                                                                $(this).attr('checked', false);
                                                                return;
                                                        }
                                                }
+                                               settings.checked.push(groupname);
                                        }else{
                                                var index=settings.checked.indexOf(groupname);
-                                               settings.checked.splice(index,1);
                                                if(settings.onuncheck){
                                                        if(settings.onuncheck(groupname)===false){
                                                                $(this).attr('checked',true);
                                                                return;
                                                        }
                                                }
+                                               settings.checked.splice(index,1);
                                        }
                                        var oldWidth=button.width();
                                        if(settings.checked.length>0){