show display name in input field

This commit is contained in:
Björn Schießle 2013-01-28 17:01:37 +01:00
parent 590c4aa710
commit f3a99f4869
2 changed files with 4 additions and 2 deletions

View file

@ -305,7 +305,8 @@ $(document).ready(function () {
event.stopPropagation();
var img = $(this);
var uid = img.parent().parent().attr('data-uid');
var input = $('<input type="text">');
var displayName = img.parent().parent().attr('data-displayName');
var input = $('<input type="text" value="'+displayName+'">');
img.css('display', 'none');
img.parent().children('span').replaceWith(input);
input.focus();

View file

@ -91,7 +91,8 @@ var isadmin = <?php echo $_['isadmin']?'true':'false'; ?>;
</thead>
<tbody>
<?php foreach($_["users"] as $user): ?>
<tr data-uid="<?php echo $user["name"] ?>">
<tr data-uid="<?php echo $user["name"] ?>"
data-displayName="<?php echo $user["displayName"] ?>">
<td class="name"><?php echo $user["name"]; ?></td>
<td class="displayName"><span><?php echo $user["displayName"]; ?></span> <img class="svg action"
src="<?php echo image_path('core', 'actions/rename.svg')?>"