summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest/static
diff options
context:
space:
mode:
authorMagnus Hagander2014-07-15 09:50:10 +0000
committerMagnus Hagander2014-07-15 09:50:10 +0000
commit0eba14c4159a492edfa9e66fab0403440645154f (patch)
tree51d433c7d5fbb098e6e7d139cb441745244b00f5 /pgcommitfest/commitfest/static
parentdc3c89cc70246a31fedafecf9c8863e209b244b6 (diff)
Add proper support for committing patches
This will prompt for who was the committer, and default to either the user listed as a committer if there is one, or to the current user if the current user happens to be a committer.
Diffstat (limited to 'pgcommitfest/commitfest/static')
-rw-r--r--pgcommitfest/commitfest/static/commitfest/js/commitfest.js24
1 files changed, 16 insertions, 8 deletions
diff --git a/pgcommitfest/commitfest/static/commitfest/js/commitfest.js b/pgcommitfest/commitfest/static/commitfest/js/commitfest.js
index 1fd5d04..579ad18 100644
--- a/pgcommitfest/commitfest/static/commitfest/js/commitfest.js
+++ b/pgcommitfest/commitfest/static/commitfest/js/commitfest.js
@@ -4,14 +4,6 @@ function verify_reject() {
function verify_returned() {
return confirm('Are you sure you want to close this patch as Returned with Feedback?\n\nThis means the patch will be marked as closed in this commitfest, but will automatically be moved to the next one. If no further work is expected on this patch, it should be closed with "Rejected" istead.\n\nSo - are you sure?');
}
-function verify_committed(is_committer) {
- if (is_committer)
- return confirm('Are you sure you want to close this patch as Committed?');
- else {
- alert('Currently, only the committer who actually made the commit can do this. We should make a little prompt for the committer field otherwise..');
- return false;
- }
-}
function findLatestThreads() {
$('#attachThreadListWrap').addClass('loading');
@@ -110,6 +102,22 @@ function doAttachThread(cfid, patchid, msgid) {
});
}
+function flagCommitted(committer) {
+ $('#commitModal').modal();
+ $('#committerSelect').val(committer);
+ $('#doCommitButton').unbind('click');
+ $('#doCommitButton').click(function() {
+ var c = $('#committerSelect').val();
+ if (!c) {
+ alert('You need to select a committer before you can mark a patch as committed!');
+ return;
+ }
+ document.location.href='close/committed/?c=' + c;
+ });
+ return false;
+}
+
+
function sortpatches(sortby) {
$('#id_sortkey').val(sortby);
$('#filterform').submit();