]> source.dussan.org Git - nextcloud-server.git/commitdiff
Always have the username as string in user admin
authorBart Visscher <bartv@thisnet.nl>
Wed, 14 Nov 2012 20:28:23 +0000 (21:28 +0100)
committerBart Visscher <bartv@thisnet.nl>
Wed, 14 Nov 2012 20:52:28 +0000 (21:52 +0100)
settings/js/users.js

index cad3667c50e731273b3a0e7c407f34c6fd8993c5..91be1a443851b8e06f69c96c1b449b41b6f49406 100644 (file)
@@ -67,7 +67,7 @@ var UserList={
 
        add:function(username, groups, subadmin, quota, sort) {
                var tr = $('tbody tr').first().clone();
-               tr.data('uid', username);
+               tr.attr('data-uid', username);
                tr.find('td.name').text(username);
                var groupsSelect = $('<select multiple="multiple" class="groupsselect" data-placehoder="Groups" title="Groups">');
                groupsSelect.data('username', username);
@@ -121,7 +121,7 @@ var UserList={
                if (sort) {
                        username = username.toLowerCase();
                        $('tbody tr').each(function() {
-                               if (username < $(this).data('uid').toLowerCase()) {
+                               if (username < $(this).attr('data-uid').toLowerCase()) {
                                        $(tr).insertBefore($(this));
                                        added = true;
                                        return false;
@@ -265,7 +265,7 @@ $(document).ready(function(){
        
        $('td.remove>a').live('click',function(event){
                var row = $(this).parent().parent();
-               var uid = $(row).data('uid');
+               var uid = $(row).attr('data-uid');
                $(row).hide();
                // Call function for handling delete/undo
                UserList.do_delete(uid);
@@ -274,7 +274,7 @@ $(document).ready(function(){
        $('td.password>img').live('click',function(event){
                event.stopPropagation();
                var img=$(this);
-               var uid=img.parent().parent().data('uid');
+               var uid=img.parent().parent().attr('data-uid');
                var input=$('<input type="password">');
                img.css('display','none');
                img.parent().children('span').replaceWith(input);
@@ -304,7 +304,7 @@ $(document).ready(function(){
        
        $('select.quota, select.quota-user').live('change',function(){
                var select=$(this);
-               var uid=$(this).parent().parent().parent().data('uid');
+               var uid=$(this).parent().parent().parent().attr('data-uid');
                var quota=$(this).val();
                var other=$(this).next();
                if(quota!='other'){
@@ -322,7 +322,7 @@ $(document).ready(function(){
        })
        
        $('input.quota-other').live('change',function(){
-               var uid=$(this).parent().parent().parent().data('uid');
+               var uid=$(this).parent().parent().parent().attr('data-uid');
                var quota=$(this).val();
                var select=$(this).prev();
                var other=$(this);