diff options
author | Cherrg <michael@gnehr.de> | 2019-07-08 17:50:33 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2019-07-08 18:50:33 +0300 |
commit | f8497669981e78059a69cfb10a695a1d7905a920 (patch) | |
tree | 8da33749c107253be771549547a684eb5571479b | |
parent | f4818671e444f8c5bf2706c46a290d2ebe24c0fa (diff) | |
download | gitea-f8497669981e78059a69cfb10a695a1d7905a920.tar.gz gitea-f8497669981e78059a69cfb10a695a1d7905a920.zip |
backport of #7380 (#7383)
fix post parameter - on issue list - unset assignee
Signed-off-by: Michael Gnehr <michael@gnehr.de>
-rw-r--r-- | public/js/index.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/public/js/index.js b/public/js/index.js index 22e4f9d419..de0536dbaa 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -2104,12 +2104,16 @@ $(document).ready(function () { }); $('.issue-action').click(function () { - var action = this.dataset.action - var elementId = this.dataset.elementId - var issueIDs = $('.issue-checkbox').children('input:checked').map(function() { + let action = this.dataset.action; + let elementId = this.dataset.elementId; + let issueIDs = $('.issue-checkbox').children('input:checked').map(function() { return this.dataset.issueId; }).get().join(); - var url = this.dataset.url + let url = this.dataset.url; + if (elementId === '0' && url.substr(-9) === '/assignee'){ + elementId = ''; + action = 'clear'; + } updateIssuesMeta(url, action, issueIDs, elementId).then(reload); }); |