aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/index.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js
index c67b3c809b..848c88bb1f 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -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) {