draft: fixed logic in toggle all draft for submit.

This commit is contained in:
Milka Kuzminski 2021-04-09 11:27:31 +02:00
parent 72085d16b0
commit d7214dc941

View file

@ -560,7 +560,7 @@
<div class="right-sidebar-expanded-state pr-details-title">
<span style="padding-left: 2px">
<input name="select_all_drafts" type="checkbox" onclick="$('[name=submit_draft]').prop('checked', !$('[name=submit_draft]').prop('checked'))">
<input name="select_all_drafts" type="checkbox" onclick="selectDraftComments(event)">
</span>
<span class="sidebar-heading noselect" onclick="refreshDraftComments(); return false">
<i class="icon-comment icon-draft"></i>
@ -942,6 +942,11 @@ window.setObserversData = ${c.pull_request_set_observers_data_json | n};
}
}
window.selectDraftComments = function (event) {
var $target = $(event.currentTarget);
$('[name=submit_draft]').prop('checked', $target.prop('checked'))
}
window.closePullRequest = function (status) {
if (!confirm(_gettext('Are you sure to close this pull request without merging?'))) {
return false;