diff --git a/admin/css/users.css b/admin/css/users.css index 27bd704c59..7c0b76f369 100644 --- a/admin/css/users.css +++ b/admin/css/users.css @@ -1,6 +1,12 @@ -form { display:inline } -td.remove>img,td.select>input { display:none;cursor:pointer } -td.select,td.remove { width:1em } -tr:hover>td.remove>img { display:inline } -li.selected { background-color:#ddd } -#content>table { margin-top:6.5em } +form { display:inline; } +td.password>img, td.remove>img{ display:none;cursor:pointer; } +td.password>span { margin-right:1.2em; } +td.password { width:12em; } +td.password>img { float:right; } + +td.remove { width:1em } +tr:hover>td.password>span{ margin:0; } +tr:hover>td.remove>img, tr:hover>td.password>img { display:inline; } +li.selected { background-color:#ddd; } +#content>table { margin-top:6.5em; } +table { width:100%; } diff --git a/admin/js/users.js b/admin/js/users.js index 7402255750..a9110205b5 100644 --- a/admin/js/users.js +++ b/admin/js/users.js @@ -45,6 +45,29 @@ $(document).ready(function(){ $(this).parent().parent().remove(); }); + $('td.password>img').live('click',function(event){ + var img=$(this); + var uid=img.parent().parent().data('uid'); + var input=$(''); + img.css('display','none'); + img.parent().children('span').replaceWith(input); + input.focus(); + input.keypress(function(event) { + if(event.keyCode == 13) { + $.post( + OC.filePath('admin','ajax','changepassword.php'), + {username:uid,password:$(this).val()}, + function(result){} + ); + input.blur(); + } + }); + input.blur(function(){ + $(this).replaceWith($('●●●●●●●')); + img.css('display',''); + }); + }); + $('#newuser').submit(function(event){ event.preventDefault(); var username=$('#newusername').val(); @@ -72,6 +95,9 @@ $(document).ready(function(){ select.append($('')); }); tr.find('td.groups').append(select); + if(tr.find('td.remve img').length==0){ + tr.find('td.remove').append($('Remove')); + } applyMultiplySelect(select); $('#content table tr').last().after(tr); }); diff --git a/admin/templates/users.php b/admin/templates/users.php index 63f512d443..166f78ed91 100644 --- a/admin/templates/users.php +++ b/admin/templates/users.php @@ -19,8 +19,11 @@ foreach($_["groups"] as $group){ "> - +
+ ●●●●●●● + +