Support on completion callback

This commit is contained in:
bfederle 2012-01-25 13:56:51 -08:00
parent 1048a42a24
commit fd0d08f2cd
1 changed files with 5 additions and 1 deletions

View File

@ -63,7 +63,11 @@ var pollAsyncJobResult = function(args) {
setTimeout(function() {
$(window).trigger('cloudStack.fullRefresh');
}, 500);
}
}
if (args._custom.onComplete) {
args._custom.onComplete(json);
}
}
else if (result.jobstatus == 2) { // Failed
var msg = (result.jobresult.errortext == null)? "": result.jobresult.errortext;