package/ui/phpvirtualbox/js/utils.js
/**
 * General application failure
 * @param {String|Object} msg - Optional extra message appended to error
 * 		or error object passed to vboxAlert
 */
General application failure
@param {String|Object} msg - Optional extra message appended to error
or error object passed to vboxAlert
General application failure @param { String|Object } msg - Optional extra message appended to error or error object passed to vboxAlert
function phpVirtualBoxFailure(msg) {
	if($('#vboxPane').data('vboxFatalError')) return;
	$('#vboxPane').data('vboxFatalError', 1);
	$('#vboxPane').css({'display':'none'});
	$('#vboxPane').trigger('phpVirtualBoxFailure');
	if(typeof(msg) == 'string') {
		vboxAlert(trans('There was an error obtaining the list of registered virtual machines from VirtualBox. Make sure vboxwebsrv is running and that the settings in config.php are correct.<p>The list of virtual machines will not begin auto-refreshing again until this page is reloaded.</p>','phpVirtualBox')+(msg ? msg : ''));
	} else {
		msg.error = trans('There was an error obtaining the list of registered virtual machines from VirtualBox. Make sure vboxwebsrv is running and that the settings in config.php are correct.<p>The list of virtual machines will not begin auto-refreshing again until this page is reloaded.</p>','phpVirtualBox') + msg.error;		
		vboxAlert(msg);
	}
}
function phpVirtualBoxFailure ( msg ) { if ( $ ( '#vboxPane' ) . data ( 'vboxFatalError' ) ) return ; $ ( '#vboxPane' ) . data ( 'vboxFatalError' , 1 ) ; $ ( '#vboxPane' ) . css ( { 'display' : 'none' } ) ; $ ( '#vboxPane' ) . trigger ( 'phpVirtualBoxFailure' ) ; if ( typeof ( msg ) == 'string' ) { vboxAlert ( trans ( 'There was an error obtaining the list of registered virtual machines from VirtualBox. Make sure vboxwebsrv is running and that the settings in config.php are correct.<p>The list of virtual machines will not begin auto-refreshing again until this page is reloaded.</p>' , 'phpVirtualBox' ) + ( msg ? msg : '' ) ) ; } else { msg . error = trans ( 'There was an error obtaining the list of registered virtual machines from VirtualBox. Make sure vboxwebsrv is running and that the settings in config.php are correct.<p>The list of virtual machines will not begin auto-refreshing again until this page is reloaded.</p>' , 'phpVirtualBox' ) + msg . error ; vboxAlert ( msg ) ; } }
General application failure
 @param {String|Object} msg - Optional extra message appended to error
              or error object passed to vboxAlert
General application failure @param { String|Object } msg - Optional extra message appended to error or error object passed to vboxAlert