File tree Expand file tree Collapse file tree 1 file changed +20
-3
lines changed
Expand file tree Collapse file tree 1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -403,9 +403,26 @@ <h5 id="sequence-controls-title" class="modal-title">Sequence Settings</h5>
403403 return ;
404404 }
405405 if ( extension == 'microbetrace' || extension == 'hivtrace' ) {
406- let reader = new FileReader ( ) ;
407- reader . onloadend = out => MT . processJSON ( out . target . result , extension ) ;
408- reader . readAsText ( rawfile , 'UTF-8' ) ;
406+ document . getElementById ( 'loading-information' ) . innerHTML = "<p>Processing file(s)...</p>" ;
407+ new Promise ( function ( resolve , reject ) {
408+ $ ( '#loading-information-modal' ) . on ( 'shown.bs.modal' , function ( e ) {
409+ session . messages = [ ] ;
410+ $ ( '#loading-information' ) . html ( '' ) ;
411+ resolve ( "done" ) ;
412+ } ) ;
413+ $ ( '#loading-information-modal' ) . modal ( {
414+ backdrop : false ,
415+ keyboard : false
416+ } ) ;
417+ session . network . launched = true ;
418+ setTimeout ( ( ) => reject ( new Error ( "Problem loading information modal!" ) ) , 5000 ) ;
419+ } ) . then (
420+ result => { let reader = new FileReader ( ) ;
421+ reader . onloadend = out => MT . processJSON ( out . target . result , extension ) ;
422+ reader . readAsText ( rawfile , 'UTF-8' ) ; } , //
423+ error => { alert ( error ) ; launch ( ) ; } // informational modal doesn't load
424+ ) ;
425+
409426 return ;
410427 }
411428 if ( extension == 'svg' ) {
You can’t perform that action at this time.
0 commit comments