[freeside-commits] freeside/FS/FS/UI Web.pm,1.44,1.45
Jeff Finucane,420,,
jeff at wavetail.420.am
Tue Jun 1 12:58:29 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS/UI
In directory wavetail.420.am:/tmp/cvs-serv24458/FS/FS/UI
Modified Files:
Web.pm
Log Message:
add progressbar, redirection, and improve links RT#8274
Index: Web.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/UI/Web.pm,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -w -d -r1.44 -r1.45
--- Web.pm 9 Apr 2010 08:18:24 -0000 1.44
+++ Web.pm 1 Jun 2010 19:58:27 -0000 1.45
@@ -494,6 +494,7 @@
use FS::UID qw(getotaker);
use FS::Record qw(qsearchs);
use FS::queue;
+use FS::CGI qw(rooturl);
$DEBUG = 0;
@@ -565,6 +566,7 @@
}
}
$param{CurrentUser} = getotaker();
+ $param{RootURL} = rooturl($self->{cgi}->self_url);
warn "FS::UI::Web::start_job\n".
join('', map {
if ( ref($param{$_}) ) {
@@ -620,13 +622,15 @@
}
my @return;
- if ( $job && $job->status ne 'failed' ) {
+ if ( $job && $job->status ne 'failed' && $job->status ne 'done' ) {
my ($progress, $action) = split ',', $job->statustext, 2;
$action ||= 'Server processing job';
@return = ( 'progress', $progress, $action );
} elsif ( !$job ) { #handle job gone case : job successful
# so close popup, redirect parent window...
@return = ( 'complete' );
+ } elsif ( $job->status eq 'done' ) {
+ @return = ( 'done', $job->statustext, '' );
} else {
@return = ( 'error', $job ? $job->statustext : $jobnum );
}
More information about the freeside-commits
mailing list