aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-08-11 11:26:57 +0200
committerRobin Appelman <icewind1991@gmail.com>2011-08-11 11:27:20 +0200
commit2e58752e1288151072ba0054f5dd45fc72a69067 (patch)
treecc2a8981be5a31e0b419b5d34cd91d62ae70ff81
parent8639630a18e0fcace249dd1787a72ff1c030f805 (diff)
downloadnextcloud-server-2e58752e1288151072ba0054f5dd45fc72a69067.tar.gz
nextcloud-server-2e58752e1288151072ba0054f5dd45fc72a69067.zip
more work on user management
-rw-r--r--admin/css/users.css18
-rw-r--r--admin/js/users.js26
-rw-r--r--admin/templates/users.php5
3 files changed, 42 insertions, 7 deletions
diff --git a/admin/css/users.css b/admin/css/users.css
index 27bd704c599..7c0b76f3691 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 7402255750f..a9110205b55 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=$('<input type="password">');
+ 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($('<span>●●●●●●●</span>'));
+ img.css('display','');
+ });
+ });
+
$('#newuser').submit(function(event){
event.preventDefault();
var username=$('#newusername').val();
@@ -72,6 +95,9 @@ $(document).ready(function(){
select.append($('<option value="'+group+'">'+group+'</option>'));
});
tr.find('td.groups').append(select);
+ if(tr.find('td.remve img').length==0){
+ tr.find('td.remove').append($('<img alt="Remove" title="'+t('admin','Remove')+'" class="svg" src="'+OC.imagePath('core','actions/delete')+'"/>'));
+ }
applyMultiplySelect(select);
$('#content table tr').last().after(tr);
});
diff --git a/admin/templates/users.php b/admin/templates/users.php
index 63f512d4432..166f78ed919 100644
--- a/admin/templates/users.php
+++ b/admin/templates/users.php
@@ -19,8 +19,11 @@ foreach($_["groups"] as $group){
<table data-groups="<?php echo implode(', ',$allGroups);?>">
<?php foreach($_["users"] as $user): ?>
<tr data-uid="<?php echo $user["name"] ?>">
- <td class="select"><input type="checkbox"></input></td>
<td class="name"><?php echo $user["name"]; ?></td>
+ <td class="password">
+ <span>●●●●●●●</span>
+ <img class="svg" src="<?php echo image_path('core','actions/rename.svg')?>"/>
+ </td>
<td class="groups">
<select data-username="<?php echo $user['name'] ;?>" data-user-groups="<?php echo $user['groups'] ;?>" data-placeholder="groups" title="<?php echo $l->t('Groups')?>" multiple="multiple">
<?php foreach($_["groups"] as $group): ?>