mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-10 07:25:50 +01:00
Implemented the label edit process.
This commit is contained in:
@@ -189,21 +189,22 @@ $(function(){
|
||||
});
|
||||
|
||||
$('a.toggle-label').click(function(){
|
||||
var url = '@url(repository)/issues/@issue.issueId/label/' + $(this).data('label-id');
|
||||
var icon;
|
||||
var path, icon;
|
||||
var i = $(this).children('i');
|
||||
if(i.hasClass('icon-ok')){
|
||||
url += '/delete';
|
||||
path = 'delete';
|
||||
icon = 'icon-white';
|
||||
} else {
|
||||
url += '/new';
|
||||
path = 'new';
|
||||
icon = 'icon-ok';
|
||||
}
|
||||
$.post(url,
|
||||
$.post('@url(repository)/issues/@issue.issueId/label/' + path,
|
||||
{
|
||||
labelId : $(this).data('label-id')
|
||||
},
|
||||
function(data){
|
||||
i.removeClass().addClass(icon);
|
||||
// TODO label sort
|
||||
alert(data);
|
||||
$('ul.label-list').empty().html(data);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user