forked from forgejo/forgejo
Add UI to delete tracked times (#14100)
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
6a696b93b1
commit
d38ae597e1
13 changed files with 123 additions and 4 deletions
|
@ -3203,12 +3203,17 @@ function initVueApp() {
|
|||
|
||||
function initIssueTimetracking() {
|
||||
$(document).on('click', '.issue-add-time', () => {
|
||||
$('.mini.modal').modal({
|
||||
$('.issue-start-time-modal').modal({
|
||||
duration: 200,
|
||||
onApprove() {
|
||||
$('#add_time_manual_form').trigger('submit');
|
||||
}
|
||||
}).modal('show');
|
||||
$('.issue-start-time-modal input').on('keydown', (e) => {
|
||||
if ((e.keyCode || e.key) === 13) {
|
||||
$('#add_time_manual_form').trigger('submit');
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).on('click', '.issue-start-time, .issue-stop-time', () => {
|
||||
$('#toggle_stopwatch_form').trigger('submit');
|
||||
|
@ -3216,6 +3221,15 @@ function initIssueTimetracking() {
|
|||
$(document).on('click', '.issue-cancel-time', () => {
|
||||
$('#cancel_stopwatch_form').trigger('submit');
|
||||
});
|
||||
$(document).on('click', 'button.issue-delete-time', function () {
|
||||
const sel = `.issue-delete-time-modal[data-id="${$(this).data('id')}"]`;
|
||||
$(sel).modal({
|
||||
duration: 200,
|
||||
onApprove() {
|
||||
$(`${sel} form`).trigger('submit');
|
||||
}
|
||||
}).modal('show');
|
||||
});
|
||||
}
|
||||
|
||||
function initFilterBranchTagDropdown(selector) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue