diff options
Diffstat (limited to 'web_src/js/index.js')
-rw-r--r-- | web_src/js/index.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index 81243c3916..de9b99d4ef 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -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, |