mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-19 08:20:13 +00:00
parent
7be5935c55
commit
1bff02de55
29 changed files with 967 additions and 48 deletions
|
@ -1769,6 +1769,7 @@ $(document).ready(function () {
|
|||
initTopicbar();
|
||||
initU2FAuth();
|
||||
initU2FRegister();
|
||||
initIssueList();
|
||||
|
||||
// Repo clone url.
|
||||
if ($('#repo-clone-url').length > 0) {
|
||||
|
@ -2488,3 +2489,41 @@ function updateDeadline(deadlineString) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
function deleteDependencyModal(id, type) {
|
||||
$('.remove-dependency')
|
||||
.modal({
|
||||
closable: false,
|
||||
duration: 200,
|
||||
onApprove: function () {
|
||||
$('#removeDependencyID').val(id);
|
||||
$('#dependencyType').val(type);
|
||||
$('#removeDependencyForm').submit();
|
||||
}
|
||||
}).modal('show')
|
||||
;
|
||||
}
|
||||
|
||||
function initIssueList() {
|
||||
var repolink = $('#repolink').val();
|
||||
$('.new-dependency-drop-list')
|
||||
.dropdown({
|
||||
apiSettings: {
|
||||
url: '/api/v1/repos' + repolink + '/issues?q={query}',
|
||||
onResponse: function(response) {
|
||||
var filteredResponse = {'success': true, 'results': []};
|
||||
// Parse the response from the api to work with our dropdown
|
||||
$.each(response, function(index, issue) {
|
||||
filteredResponse.results.push({
|
||||
'name' : '#' + issue.number + ' ' + issue.title,
|
||||
'value' : issue.id
|
||||
});
|
||||
});
|
||||
return filteredResponse;
|
||||
},
|
||||
},
|
||||
|
||||
fullTextSearch: true
|
||||
})
|
||||
;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue