diff options
author | 赵智超 <1012112796@qq.com> | 2020-04-11 12:44:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-11 01:44:50 -0300 |
commit | cc07b9ca3773573144263e4293f7a2ca7e3b9e5e (patch) | |
tree | d1030819346fe245b87e119671a1243f8cb01dd5 /web_src | |
parent | 8592fb7121874f7998e0df10c3c7e6777eb78033 (diff) | |
download | gitea-cc07b9ca3773573144263e4293f7a2ca7e3b9e5e.tar.gz gitea-cc07b9ca3773573144263e4293f7a2ca7e3b9e5e.zip |
Fix CreateComment for SQLite and JS click event on Request Review (#11040)
* fix some bug about Request review
* fix ``CreateComment`` wrong using ,it will not work when use Sqlite
* fix wrong js click event code , it will send wrong data when it has
many choices
Signed-off-by: a1012112796 <1012112796@qq.com>
* Apply suggestions from code review
Co-Authored-By: Lauris BH <lauris@nix.lv>
* add getReviewerByIssueIDAndUserID
fix wrong conditions check in initIssueComments after #10972
* call CI again
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
Diffstat (limited to 'web_src')
-rw-r--r-- | web_src/js/index.js | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/web_src/js/index.js b/web_src/js/index.js index c56abdde88..6476b2cfbf 100644 --- a/web_src/js/index.js +++ b/web_src/js/index.js @@ -661,17 +661,21 @@ function initInstall() { } function initIssueComments() { - if ($('.repository.view.issue .comments').length === 0) return; + if ($('.repository.view.issue .timeline').length === 0) return; + + $('.re-request-review').on('click', function (event) { + const url = $(this).data('update-url'); + const issueId = $(this).data('issue-id'); + const id = $(this).data('id'); + const isChecked = $(this).data('is-checked'); - $('.re-request-review').click((event) => { - const $this = $('.re-request-review'); event.preventDefault(); updateIssuesMeta( - $this.data('update-url'), + url, '', - $this.data('issue-id'), - $this.data('id'), - $this.data('is-checked') + issueId, + id, + isChecked ).then(reload); }); |