mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-05 04:56:02 +01:00
Set icon when assignee is changed in page
The javascript code did not set icon, whereas the view script does.
This commit is contained in:
@@ -188,7 +188,8 @@ $(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
$('a.assign').click(function(){
|
$('a.assign').click(function(){
|
||||||
var userName = $(this).data('name');
|
var $this = $(this);
|
||||||
|
var userName = $this.data('name');
|
||||||
$.post('@url(repository)/issues/@issue.issueId/assign',
|
$.post('@url(repository)/issues/@issue.issueId/assign',
|
||||||
{
|
{
|
||||||
assignedUserName: userName
|
assignedUserName: userName
|
||||||
@@ -198,9 +199,10 @@ $(function(){
|
|||||||
if(userName == ''){
|
if(userName == ''){
|
||||||
$('#label-assigned').text('No one is assigned');
|
$('#label-assigned').text('No one is assigned');
|
||||||
} else {
|
} else {
|
||||||
$('#label-assigned').html($('<span>')
|
$('#label-assigned').empty()
|
||||||
|
.append($this.find('img.avatar').clone(false)).append(' ')
|
||||||
.append($('<a class="username strong">').attr('href', '@path/' + userName).text(userName))
|
.append($('<a class="username strong">').attr('href', '@path/' + userName).text(userName))
|
||||||
.append(' is assigned'));
|
.append(' is assigned');
|
||||||
$('a.assign[data-name=' + userName + '] i').attr('class', 'icon-ok');
|
$('a.assign[data-name=' + userName + '] i').attr('class', 'icon-ok');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user