mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 11:36:05 +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(){
|
||||
var userName = $(this).data('name');
|
||||
var $this = $(this);
|
||||
var userName = $this.data('name');
|
||||
$.post('@url(repository)/issues/@issue.issueId/assign',
|
||||
{
|
||||
assignedUserName: userName
|
||||
@@ -198,9 +199,10 @@ $(function(){
|
||||
if(userName == ''){
|
||||
$('#label-assigned').text('No one is assigned');
|
||||
} 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(' is assigned'));
|
||||
.append(' is assigned');
|
||||
$('a.assign[data-name=' + userName + '] i').attr('class', 'icon-ok');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user