Skip to content

Commit 3c8b480

Browse files
committed
Fix modals
1 parent d284aa6 commit 3c8b480

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

media/commitfest/css/commitfest.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
* commitfest.postgresql.org specific styles
33
*/
44

5+
body {
6+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
7+
}
8+
59
/* Bootstrap 5 inline delete/close buttons */
610
.btn-outline-danger.btn-sm {
711
font-size: 0.75rem;

media/commitfest/js/commitfest.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ function addAnnotation(threadid) {
180180
$("#annotateThreadList").find("option").remove();
181181
$("#annotateMessage").val("");
182182
$("#annotateMsgId").val("");
183-
$("#annotateModal").modal();
183+
const modal = new bootstrap.Modal(document.getElementById('annotateModal'));
184+
modal.show();
184185
$("#annotateThreadList").focus();
185186
updateAnnotationMessages(threadid);
186187
$("#doAnnotateMessageButton").unbind("click");
@@ -204,7 +205,7 @@ function addAnnotation(threadid) {
204205
alert(data);
205206
$("#annotateMessageBody").removeClass("loading");
206207
} else {
207-
$("#annotateModal").modal("hide");
208+
modal.hide();
208209
location.reload();
209210
}
210211
})
@@ -247,7 +248,8 @@ function deleteAnnotation(annid) {
247248
}
248249

249250
function flagCommitted(committer) {
250-
$("#commitModal").modal();
251+
const modal = new bootstrap.Modal(document.getElementById('commitModal'));
252+
modal.show();
251253
$("#committerSelect")[0].selectize.setValue(committer);
252254
$("#doCommitButton").unbind("click");
253255
$("#doCommitButton").click(() => {
@@ -305,6 +307,7 @@ function togglePatchFilterButton(buttonId, collapseId) {
305307
* Upstream user search dialog
306308
*/
307309
function search_and_store_user() {
310+
const modal = new bootstrap.Modal(document.getElementById('searchUserModal'));
308311
$("#doSelectUserButton").unbind("click");
309312
$("#doSelectUserButton").click(() => {
310313
if (!$("#searchUserList").val()) {
@@ -318,7 +321,7 @@ function search_and_store_user() {
318321
.success((data) => {
319322
if (data === "OK") {
320323
alert("User imported!");
321-
$("#searchUserModal").modal("hide");
324+
modal.hide();
322325
} else {
323326
alert(`Failed to import user: ${data}`);
324327
}
@@ -330,7 +333,7 @@ function search_and_store_user() {
330333
return false;
331334
});
332335

333-
$("#searchUserModal").modal();
336+
modal.show();
334337
}
335338

336339
function findUsers() {

pgcommitfest/commitfest/templates/patch.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ <h4>Annotations</h4>
220220
<div class="modal-dialog modal-lg">
221221
<div class="modal-content">
222222
<div class="modal-header">
223+
<h4 class="modal-title">Flag as committed</h4>
223224
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
224-
<h3>Flag as committed</h3>
225225
</div>
226226
<div class="modal-body">
227227
<form class="form" style="margin-bottom: 5px;">
@@ -249,8 +249,8 @@ <h3>Flag as committed</h3>
249249
<div class="modal fade" id="annotateModal" role="dialog">
250250
<div class="modal-dialog modal-lg"><div class="modal-content">
251251
<div class="modal-header">
252+
<h4 class="modal-title">Add annotation</h4>
252253
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
253-
<h3>Add annotation</h3>
254254
</div>
255255
<div id="annotateMessageBody" class="modal-body">
256256
<div>Pick one of the messages in this thread</div>

0 commit comments

Comments
 (0)