$('#textinfo_waitbox').hide();
$('#textinfo_load_status').empty();
$('#textinfo_container').show();
+ // The tradition name should appear here and should be identical in the
+ // corresponding directory span. In case the name was just changed...
$('.texttitle').empty().append( selectedTextInfo.name );
+ $('#' + selectedTextID).empty().append( selectedTextInfo.name );
// Witnesses
$('#witness_num').empty().append( selectedTextInfo.witnesses.size );
$('#witness_list').empty().append( selectedTextInfo.witnesses.join( ', ' ) );
if( selectedTextInfo.stemweb_jobid == 0 ) {
// We want to run Stemweb.
$('#open_stemweb_ui').show();
- $('#call_stemweb').show()
$('#query_stemweb_ui').hide();
- $('#stemweb_run_button').show();
+ if( ! $('#stemweb-ui-dialog').dialog('isOpen') ) {
+ $('#call_stemweb').show()
+ $('#stemweb_run_button').show();
+ }
} else {
$('#query_stemweb_ui').show();
$('#open_stemweb_ui').hide();
failureMsg = 'Your stemweb query failed';
if( data.message ) {
failureMsg = failureMsg + ' with the following message: ' + data.message
+ } else {
+ failureMsg = failureMsg + ' without telling us why.'
}
$('#stemweb_run_status').empty().append(
- _make_message( 'error', failuremsg + '.' ) );
+ _make_message( 'error', failureMsg ) );
}
- switch_stemweb_ui();
}
function _make_message( type, msg ) {
id: 'stemweb_close_button',
text: 'Close',
click: function() {
- $('#stemweb-ui-dialog').dialog('close');
+ $('#stemweb-ui-dialog').dialog('close');
+ switch_stemweb_ui();
},
},
},