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