Merge commit 'v7.10.24' into WebGUI8

This commit is contained in:
Colin Kuskie 2012-01-17 15:03:45 -08:00
commit 3b418ede3c
139 changed files with 699 additions and 32133 deletions

View file

@ -98,7 +98,7 @@ my $template = <<'TEMPLATE';
url : params.statusUrl,
draw : function (data) {
var status = YAHOO.lang.JSON.parse(data.status);
bar.update(status.finished, status.total);
bar.update(status.current, status.total);
document.getElementById('message').innerHTML = status.message;
document.getElementById('elapsed').innerHTML = data.elapsed;
},
@ -106,8 +106,8 @@ my $template = <<'TEMPLATE';
document.getElementById('loading').style.display = 'none';
document.getElementById('ui').style.display = 'block';
},
finish : function() {
YAHOO.WebGUI.Fork.redirect(params);
finish : function(data) {
YAHOO.WebGUI.Fork.redirect(data.redirect || params.redirect);
},
error : function (msg) {
alert(msg);

View file

@ -67,7 +67,7 @@ See the synopsis for what kind of response this generates.
sub handler {
my $process = shift;
my $status = $process->getStatus;
my ( $finished, $startTime, $endTime, $error ) = $process->get( 'finished', 'startTime', 'endTime', 'error' );
my ( $finished, $startTime, $endTime, $error, $redirect ) = $process->get( qw/finished startTime endTime error redirect/ );
$endTime = time() unless $finished;
@ -76,7 +76,8 @@ sub handler {
elapsed => ( $endTime - $startTime ),
finished => ( $finished ? \1 : \0 ),
);
$status{error} = $error if $finished;
$status{error} = $error if $finished;
$status{redirect} = $redirect if $finished;
$process->session->response->content_type('text/plain');
JSON::encode_json( \%status );
} ## end sub handler