aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
Diffstat (limited to 'admin')
-rw-r--r--admin/css/users.css13
-rw-r--r--admin/js/users.js6
-rw-r--r--admin/templates/users.php27
3 files changed, 26 insertions, 20 deletions
diff --git a/admin/css/users.css b/admin/css/users.css
index 7c0b76f3691..977e06e41c6 100644
--- a/admin/css/users.css
+++ b/admin/css/users.css
@@ -1,12 +1,13 @@
form { display:inline; }
-td.password>img, td.remove>img{ display:none;cursor:pointer; }
+td.name, td.password { padding-left:.8em; }
+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.password { width:12em; cursor:pointer; }
-td.remove { width:1em }
-tr:hover>td.password>span{ margin:0; }
-tr:hover>td.remove>img, tr:hover>td.password>img { display:inline; }
+td.remove { width:1em; }
+tr:hover>td.password>span { margin:0; cursor:pointer; }
+tr:hover>td.remove>img, tr:hover>td.password>img { display:inline; cursor:pointer; }
+tr:hover>td.remove>img { float:right; }
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 d6798dca570..addf1c2d65f 100644
--- a/admin/js/users.js
+++ b/admin/js/users.js
@@ -46,6 +46,7 @@ $(document).ready(function(){
});
$('td.password>img').live('click',function(event){
+ event.stopPropagation();
var img=$(this);
var uid=img.parent().parent().data('uid');
var input=$('<input type="password">');
@@ -71,6 +72,9 @@ $(document).ready(function(){
img.css('display','');
});
});
+ $('td.password').live('click',function(event){
+ $(this).children('img').click();
+ });
$('#newuser').submit(function(event){
event.preventDefault();
@@ -88,7 +92,7 @@ $(document).ready(function(){
}
);
- var tr=$('#content table tr').first().clone();
+ var tr=$('#content table tr').first().next().clone();
tr.attr('data-uid',username);
tr.find('td.name').text(username);
var select=$('<select multiple="multiple" data-placehoder="Groups" title="Groups">');
diff --git a/admin/templates/users.php b/admin/templates/users.php
index 166f78ed919..8d6b1efe6e2 100644
--- a/admin/templates/users.php
+++ b/admin/templates/users.php
@@ -1,22 +1,22 @@
-<div id="controls">
- <form id="newuser">
- <input id="newusername" placeholder="<?php echo $l->t('Name')?>"></input>
- <input type="password" id="newuserpassword" placeholder="<?php echo $l->t('Password')?>"></input>
- <select id="newusergroups" data-placeholder="groups" title="<?php echo $l->t('Groups')?>" multiple="multiple">
- <?php foreach($_["groups"] as $group): ?>
- <option value="<?php echo $group['name'];?>"><?php echo $group['name'];?></option>
- <?php endforeach;?>
- </select>
- <input type="submit" value="<?php echo $l->t('Create')?>"></input>
- </form>
-</div>
<?php
$allGroups=array();
-foreach($_["groups"] as $group){
+foreach($_["groups"] as $group) {
$allGroups[]=$group['name'];
}
?>
+
<table data-groups="<?php echo implode(', ',$allGroups);?>">
+ <tbody id="controls">
+ <tr><form id="newuser">
+ <th class="name"><input id="newusername" placeholder="<?php echo $l->t('Name')?>"></input></th>
+ <th class="password"><input type="password" id="newuserpassword" placeholder="<?php echo $l->t('Password')?>"></input></th>
+ <th class="groups"><select id="newusergroups" data-placeholder="groups" title="<?php echo $l->t('Groups')?>" multiple="multiple">
+ <?php foreach($_["groups"] as $group): ?>
+ <option value="<?php echo $group['name'];?>"><?php echo $group['name'];?></option>
+ <?php endforeach;?>
+ </select></th>
+ <th><input type="submit" value="<?php echo $l->t('Create')?>"></input></th>
+ </form></tr>
<?php foreach($_["users"] as $user): ?>
<tr data-uid="<?php echo $user["name"] ?>">
<td class="name"><?php echo $user["name"]; ?></td>
@@ -38,4 +38,5 @@ foreach($_["groups"] as $group){
</td>
</tr>
<?php endforeach; ?>
+ </tbody>
</table>