package/ui/phpvirtualbox/js/utils.js
/**
 * Show progress dialog and periodically poll the progress' status
 * 
 * @param {String} prequest - request object passed to ajax
 * @param {Function} callback - function to run on progress completion
 * @param {String} icon - URL of image to display on progress operation dialog (optional)
 * @param {String} title - title of progress operation dialog (optional)
 * @param {String} target - contextual target of progress operation
 * @param {Boolean} blocking - true if progress operation should block other ops
 * @see vboxconnector::progressGet()
 */
Show progress dialog and periodically poll the progress' status


Show progress dialog and periodically poll the progress ' status
function vboxProgress(prequest,callback,icon,title,target,blocking) {
	title = title.replace('\.+$','');
	target = $('<div />').text(target).html();
	var persist = prequest.persist;
	prequest = {
		'progress' : prequest.progress,
		'catcherrs' : prequest.catcherrs
	};
	if(!blocking) {
		vboxProgressCreateListElement(prequest,icon,title,target,callback);
		$.when(prequest, vboxAjaxRequest('progressGet',prequest,{'persist':persist})).done(vboxProgressUpdate);
	} else {
		vboxProgressCreateDialog(prequest,icon,title,target,callback);
		$.when(prequest, vboxAjaxRequest('progressGet',prequest,{'persist':persist})).done(vboxProgressUpdateModal);
	}
}
function vboxProgress ( prequest , callback , icon , title , target , blocking ) { title = title . replace ( '\.+$' , '' ) ; target = $ ( '<div />' ) . text ( target ) . html ( ) ; var persist = prequest . persist ; prequest = { 'progress' : prequest . progress , 'catcherrs' : prequest . catcherrs } ; if ( ! blocking ) { vboxProgressCreateListElement ( prequest , icon , title , target , callback ) ; $ . when ( prequest , vboxAjaxRequest ( 'progressGet' , prequest , { 'persist' : persist } ) ) . done ( vboxProgressUpdate ) ; } else { vboxProgressCreateDialog ( prequest , icon , title , target , callback ) ; $ . when ( prequest , vboxAjaxRequest ( 'progressGet' , prequest , { 'persist' : persist } ) ) . done ( vboxProgressUpdateModal ) ; } }
Show progress dialog and periodically poll the progress' status
Show progress dialog and periodically poll the progress ' status
// Fix title
 // Sanitize target
 // Sanitize progress request data
 // Blocking creates a dialog
