Merge branch 'bug_9797' into 3.12-master

This commit is contained in:
Jared Camins-Esakov 2013-03-29 21:44:08 -04:00
commit a19d663438
2 changed files with 6 additions and 6 deletions

View file

@ -15,20 +15,20 @@ KOHA.AJAX = {
KOHA.xhr = xhr; KOHA.xhr = xhr;
if ( !xhr.getResponseHeader( 'content-type' ).match( 'application/json' ) ) { if ( !xhr.getResponseHeader( 'content-type' ).match( 'application/json' ) ) {
// Something really failed // Something really failed
humanMsg.displayAlert( _("Internal Server Error, please reload the page") ); humanMsg.displayAlert( MSG_INTERNAL_SERVER_ERROR );
return; return;
} }
var error = eval( '(' + xhr.responseText + ')' ); var error = eval( '(' + xhr.responseText + ')' );
if ( error.type == 'auth' ) { if ( error.type == 'auth' ) {
humanMsg.displayMsg( _("You need to log in again, your session has timed out") ); humanMsg.displayMsg( MSG_SESSION_TIMED_OUT );
} }
if ( callback ) { if ( callback ) {
callback( error ); callback( error );
} else { } else {
humanMsg.displayAlert( _("Error; your data might not have been saved") ); humanMsg.displayAlert( MSG_DATA_NOT_SAVED );
} }
}, },
MarkRunning: function ( selector, text ) { MarkRunning: function ( selector, text ) {

View file

@ -23,9 +23,9 @@
var MSG_CLICK_TO_EXPAND = _("Click to expand this section"); var MSG_CLICK_TO_EXPAND = _("Click to expand this section");
var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section"); var MSG_CLICK_TO_COLLAPSE = _("Click to collapse this section");
var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" ); var MSG_INTERNAL_SERVER_ERROR = _( "Internal Server Error, please reload the page" );
var MSG_SESSION_TIMED_OUT = _( 'You need to log in again, your session has timed out' ); var MSG_SESSION_TIMED_OUT = _( "You need to log in again, your session has timed out" );
var MSG_DATA_NOT_SAVED = _( 'Error; your data might not have been saved' ); var MSG_DATA_NOT_SAVED = _( "Error; your data might not have been saved" );
var MSG_LOADING = _( 'Loading...' ); var MSG_LOADING = _( "Loading..." );
//]]> //]]>
</script> </script>