@@ -180,7 +180,8 @@ function addAnnotation(threadid) {
180
180
$ ( "#annotateThreadList" ) . find ( "option" ) . remove ( ) ;
181
181
$ ( "#annotateMessage" ) . val ( "" ) ;
182
182
$ ( "#annotateMsgId" ) . val ( "" ) ;
183
- $ ( "#annotateModal" ) . modal ( ) ;
183
+ const modal = new bootstrap . Modal ( document . getElementById ( 'annotateModal' ) ) ;
184
+ modal . show ( ) ;
184
185
$ ( "#annotateThreadList" ) . focus ( ) ;
185
186
updateAnnotationMessages ( threadid ) ;
186
187
$ ( "#doAnnotateMessageButton" ) . unbind ( "click" ) ;
@@ -204,7 +205,7 @@ function addAnnotation(threadid) {
204
205
alert ( data ) ;
205
206
$ ( "#annotateMessageBody" ) . removeClass ( "loading" ) ;
206
207
} else {
207
- $ ( "#annotateModal" ) . modal ( " hide" ) ;
208
+ modal . hide ( ) ;
208
209
location . reload ( ) ;
209
210
}
210
211
} )
@@ -247,7 +248,8 @@ function deleteAnnotation(annid) {
247
248
}
248
249
249
250
function flagCommitted ( committer ) {
250
- $ ( "#commitModal" ) . modal ( ) ;
251
+ const modal = new bootstrap . Modal ( document . getElementById ( 'commitModal' ) ) ;
252
+ modal . show ( ) ;
251
253
$ ( "#committerSelect" ) [ 0 ] . selectize . setValue ( committer ) ;
252
254
$ ( "#doCommitButton" ) . unbind ( "click" ) ;
253
255
$ ( "#doCommitButton" ) . click ( ( ) => {
@@ -305,6 +307,7 @@ function togglePatchFilterButton(buttonId, collapseId) {
305
307
* Upstream user search dialog
306
308
*/
307
309
function search_and_store_user ( ) {
310
+ const modal = new bootstrap . Modal ( document . getElementById ( 'searchUserModal' ) ) ;
308
311
$ ( "#doSelectUserButton" ) . unbind ( "click" ) ;
309
312
$ ( "#doSelectUserButton" ) . click ( ( ) => {
310
313
if ( ! $ ( "#searchUserList" ) . val ( ) ) {
@@ -318,7 +321,7 @@ function search_and_store_user() {
318
321
. success ( ( data ) => {
319
322
if ( data === "OK" ) {
320
323
alert ( "User imported!" ) ;
321
- $ ( "#searchUserModal" ) . modal ( " hide" ) ;
324
+ modal . hide ( ) ;
322
325
} else {
323
326
alert ( `Failed to import user: ${ data } ` ) ;
324
327
}
@@ -330,7 +333,7 @@ function search_and_store_user() {
330
333
return false ;
331
334
} ) ;
332
335
333
- $ ( "#searchUserModal" ) . modal ( ) ;
336
+ modal . show ( ) ;
334
337
}
335
338
336
339
function findUsers ( ) {
0 commit comments