more work on user management
This commit is contained in:
parent
8639630a18
commit
2e58752e12
|
@ -1,6 +1,12 @@
|
||||||
form { display:inline }
|
form { display:inline; }
|
||||||
td.remove>img,td.select>input { display:none;cursor:pointer }
|
td.password>img, td.remove>img{ display:none;cursor:pointer; }
|
||||||
td.select,td.remove { width:1em }
|
td.password>span { margin-right:1.2em; }
|
||||||
tr:hover>td.remove>img { display:inline }
|
td.password { width:12em; }
|
||||||
li.selected { background-color:#ddd }
|
td.password>img { float:right; }
|
||||||
#content>table { margin-top:6.5em }
|
|
||||||
|
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%; }
|
||||||
|
|
|
@ -45,6 +45,29 @@ $(document).ready(function(){
|
||||||
$(this).parent().parent().remove();
|
$(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){
|
$('#newuser').submit(function(event){
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var username=$('#newusername').val();
|
var username=$('#newusername').val();
|
||||||
|
@ -72,6 +95,9 @@ $(document).ready(function(){
|
||||||
select.append($('<option value="'+group+'">'+group+'</option>'));
|
select.append($('<option value="'+group+'">'+group+'</option>'));
|
||||||
});
|
});
|
||||||
tr.find('td.groups').append(select);
|
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);
|
applyMultiplySelect(select);
|
||||||
$('#content table tr').last().after(tr);
|
$('#content table tr').last().after(tr);
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,8 +19,11 @@ foreach($_["groups"] as $group){
|
||||||
<table data-groups="<?php echo implode(', ',$allGroups);?>">
|
<table data-groups="<?php echo implode(', ',$allGroups);?>">
|
||||||
<?php foreach($_["users"] as $user): ?>
|
<?php foreach($_["users"] as $user): ?>
|
||||||
<tr data-uid="<?php echo $user["name"] ?>">
|
<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="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">
|
<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">
|
<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): ?>
|
<?php foreach($_["groups"] as $group): ?>
|
||||||
|
|
Loading…
Reference in New Issue