diff options
author | silverwind <me@silverwind.io> | 2021-05-08 17:28:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-08 18:28:25 +0300 |
commit | 2a9b8d173a286a7155306d7d1df6328d1eb98199 (patch) | |
tree | b9ac31d0431d3e092d9b0b0beac723f0f9386cbe /web_src/js | |
parent | 24ad131221d8cb0becf726e0570f53838262edf1 (diff) | |
download | gitea-2a9b8d173a286a7155306d7d1df6328d1eb98199.tar.gz gitea-2a9b8d173a286a7155306d7d1df6328d1eb98199.zip |
Code comments improvements (#15722)
- Right-align the Reply and Resolve buttons
- Center Resolved text and add some padding
- Add padding to inline comments
- Indent the comment content to align with author name
- Re-parent form to allow better button layout space.
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'web_src/js')
-rw-r--r-- | web_src/js/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index 5249b88516..d7fa9c8b9b 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -1175,7 +1175,7 @@ async function initRepository() { const form = $(e.currentTarget).closest('form'); if (form.length > 0 && form.hasClass('comment-form')) { form.addClass('hide'); - form.parent().find('button.comment-form-reply').show(); + form.closest('.comment-code-cloud').find('button.comment-form-reply').show(); } else { form.closest('.comment-code-cloud').remove(); } @@ -1339,7 +1339,7 @@ function initPullRequestReview() { $(document).on('click', 'button.comment-form-reply', function (e) { e.preventDefault(); $(this).hide(); - const form = $(this).parent().find('.comment-form'); + const form = $(this).closest('.comment-code-cloud').find('.comment-form'); form.removeClass('hide'); const $textarea = form.find('textarea'); let $simplemde; |