mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 10:56:10 +01:00 
			
		
		
		
	Add UI to delete tracked times (#14100)
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
		| @@ -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) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user