mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-30 19:08:37 +00:00 
			
		
		
		
	Implement delete release attachments and update release attachments' name (#14130)
* Implement delete release attachment * Add attachments on release edit page * Fix bug * Finish del release attachments * Fix frontend lint * Fix tests * Support edit release attachments * Added tests * Remove the unnecessary parameter isCreate from UpdateReleaseOrCreatReleaseFromTag * Rename UpdateReleaseOrCreatReleaseFromTag to UpdateRelease * Fix middle align
This commit is contained in:
		| @@ -1255,6 +1255,15 @@ function initPullRequestMergeInstruction() { | ||||
|   }); | ||||
| } | ||||
|  | ||||
| function initRelease() { | ||||
|   $(document).on('click', '.remove-rel-attach', function() { | ||||
|     const uuid = $(this).data('uuid'); | ||||
|     const id = $(this).data('id'); | ||||
|     $(`input[name='attachment-del-${uuid}']`).attr('value', true); | ||||
|     $(`#attachment-${id}`).hide(); | ||||
|   }); | ||||
| } | ||||
|  | ||||
| function initPullRequestReview() { | ||||
|   if (window.location.hash && window.location.hash.startsWith('#issuecomment-')) { | ||||
|     const commentDiv = $(window.location.hash); | ||||
| @@ -2748,6 +2757,7 @@ $(document).ready(async () => { | ||||
|   initNotificationsTable(); | ||||
|   initPullRequestMergeInstruction(); | ||||
|   initReleaseEditor(); | ||||
|   initRelease(); | ||||
|  | ||||
|   const routes = { | ||||
|     'div.user.settings': initUserSettings, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user