Cleanup + fmt
This commit is contained in:
parent
d2ab9e23ab
commit
9313332fd4
|
|
@ -2135,21 +2135,6 @@ function deleteDependencyModal(id, type) {
|
|||
;
|
||||
}
|
||||
|
||||
function showAddDependencyModal() {
|
||||
// Show the modal
|
||||
$('.add-dependency')
|
||||
.modal({
|
||||
duration: 200,
|
||||
onApprove: function() {
|
||||
$('#addDependencyForm').submit();
|
||||
|
||||
}
|
||||
}).modal('show')
|
||||
;
|
||||
|
||||
buildIssuesList();
|
||||
}
|
||||
|
||||
function buildIssuesList() {
|
||||
// Get a list of issues
|
||||
var repolink = $('#repolink').val();
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ func RetrieveRepoMetas(ctx *context.Context, repo *models.Repository) []*models.
|
|||
}
|
||||
ctx.Data["Branches"] = brs
|
||||
|
||||
//
|
||||
// Contains true if the user can create issue dependencies
|
||||
ctx.Data["CanCreateIssueDependencies"] = ctx.Repo.CanCreateIssueDependencies(ctx.User)
|
||||
|
||||
return labels
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import (
|
|||
|
||||
// AddDependency adds new dependencies
|
||||
func AddDependency(ctx *context.Context) {
|
||||
|
||||
depID := ctx.QueryInt64("newDependency")
|
||||
|
||||
issueIndex := ctx.ParamsInt64("index")
|
||||
|
|
@ -97,7 +96,6 @@ func RemoveDependency(ctx *context.Context) {
|
|||
depType = models.DependencyTypeBlocking
|
||||
default:
|
||||
ctx.Error(http.StatusBadRequest, "GetDependecyType")
|
||||
//ctx.Handle(http.StatusBadRequest, "GetDependecyType", nil)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -210,9 +210,9 @@
|
|||
<div class="item">
|
||||
<div class="right floated content">
|
||||
{{if $.CanCreateIssueDependencies}}
|
||||
<a class="delete-dependency-button" onclick="deleteDependencyModal({{.ID}}, 'blockedBy');">
|
||||
<i class="delete icon text red"></i>
|
||||
</a>
|
||||
<a class="delete-dependency-button" onclick="deleteDependencyModal({{.ID}}, 'blockedBy');">
|
||||
<i class="delete icon text red"></i>
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .IsClosed}}
|
||||
<div class="ui red mini label">
|
||||
|
|
@ -244,9 +244,9 @@
|
|||
<div class="item">
|
||||
<div class="right floated content">
|
||||
{{if $.CanCreateIssueDependencies}}
|
||||
<a class="delete-dependency-button" onclick="deleteDependencyModal({{.ID}}, 'blocking');">
|
||||
<i class="delete icon text red"></i>
|
||||
</a>
|
||||
<a class="delete-dependency-button" onclick="deleteDependencyModal({{.ID}}, 'blocking');">
|
||||
<i class="delete icon text red"></i>
|
||||
</a>
|
||||
{{end}}
|
||||
{{if .IsClosed}}
|
||||
<div class="ui red tiny label">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user