diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-02-14 19:53:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-14 13:53:36 +0200 |
commit | e786f098d50494cb3c8ecb716572f1a155616a00 (patch) | |
tree | 9af3f91320287241419a69b6c98fd160492ef8fa /public | |
parent | 22dec1cea6ad9a0a22b62de6bbc097cf3f2e1711 (diff) | |
download | gitea-e786f098d50494cb3c8ecb716572f1a155616a00.tar.gz gitea-e786f098d50494cb3c8ecb716572f1a155616a00.zip |
Fix reply on code review (#10261)
* Fix branch page pull request title and link error (#10092)
* Fix branch page pull request title and link error
* Fix ui
* Fix reply on code review (#10227)
Co-authored-by: zeripath <art27@cantab.net>
* Revert unrelated change
* Fix lint
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'public')
-rw-r--r-- | public/js/index.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/public/js/index.js b/public/js/index.js index c04af8cbe4..46ff00d01c 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1,6 +1,6 @@ /* globals wipPrefixes, issuesTribute, emojiTribute */ /* exported timeAddManual, toggleStopwatch, cancelStopwatch, initHeatmap */ -/* exported toggleDeadlineForm, setDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */ +/* exported toggleDeadlineForm, setDeadline, deleteDependencyModal, submitReply, cancelCodeComment, onOAuthLoginClick */ 'use strict'; function htmlEncode(text) { @@ -3171,6 +3171,14 @@ function cancelCodeComment(btn) { form.closest('.comment-code-cloud').remove() } } + +function submitReply(btn) { + const form = $(btn).closest('form'); + if (form.length > 0 && form.hasClass('comment-form')) { + form.submit(); + } +} + function onOAuthLoginClick() { const oauthLoader = $('#oauth2-login-loader'); const oauthNav = $('#oauth2-login-navigator'); |