diff options
Diffstat (limited to 'httemplate/elements')
-rw-r--r-- | httemplate/elements/header-popup.html | 3 | ||||
-rw-r--r-- | httemplate/elements/progress-init.html | 8 | ||||
-rw-r--r-- | httemplate/elements/progress-popup.html | 4 |
3 files changed, 13 insertions, 2 deletions
diff --git a/httemplate/elements/header-popup.html b/httemplate/elements/header-popup.html index bd17d2f7d..d009f6b04 100644 --- a/httemplate/elements/header-popup.html +++ b/httemplate/elements/header-popup.html @@ -27,7 +27,7 @@ Example: <META HTTP-Equiv="Expires" Content="0"> <% $head %> </HEAD> - <BODY BGCOLOR="#f8f8f8" <% $etc %>> + <BODY <% $etc %>> <link href="<%$fsurl%>elements/freeside.css" type="text/css" rel="stylesheet"> <FONT SIZE=6> <CENTER><% $title |h %></CENTER> @@ -55,6 +55,7 @@ if ( ref($_[0]) ) { $etc = @_ ? shift : ''; #$etc is for things like onLoad= etc. $head = @_ ? shift : ''; #$head is for things that go in the <HEAD> section } +$etc .= 'BGCOLOR="#f8f8f8"' if (! $etc =~ /BGCOLOR/i ); my $conf = new FS::Conf; diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index 8b8da66c8..9f17370db 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -11,6 +11,12 @@ In misc/something.html: $p.'misc/process_something.html', { url => $p.'where_to_go_next.html' }, #or { message => 'Finished!' }, + #or { url => $p.'where_to_go.html', + message => 'Finished' }, + # which displays the message, then waits for confirmation before + # redirecting to the URL. + #or { popup_url => $p.'popup_contents.html' } + # which loads that URL into the popup after completion ) %> </FORM> <SCRIPT TYPE="text/javascript>process();</SCRIPT> @@ -118,6 +124,8 @@ if ( ref($url_or_message) ) { #its a message or something $url_or_message_link = 'message='. uri_escape( $url_or_message->{'message'} ); $url_or_message_link .= ';url='. uri_escape( $url_or_message->{'url'} ) if $url_or_message->{'url'}; + $url_or_message_link = 'popup_url=' .uri_escape( $url_or_message->{'popup_url'} ) + if $url_or_message->{'popup_url'}; } else { $url_or_message_link = "url=$url_or_message"; } diff --git a/httemplate/elements/progress-popup.html b/httemplate/elements/progress-popup.html index a29210201..42e464115 100644 --- a/httemplate/elements/progress-popup.html +++ b/httemplate/elements/progress-popup.html @@ -2,6 +2,7 @@ % my $jobnum = $cgi->param('jobnum'); % my $url = $cgi->param('url'); % my $message = $cgi->param('message'); +% my $popup_url = $cgi->param('popup_url'); % my $formname = scalar($cgi->param('formname')); % @@ -64,11 +65,12 @@ function updateStatus( status_statustext ) { % } elsif ( $url ) { window.top.location.href = '<% $url %>'; +% } elsif ( $popup_url ) { + document.parentWindow.location.replace('<% $popup_url %>'); % } else { alert('job done but no url or message specified'); % } - } else if ( status.indexOf('done') > -1 ) { document.getElementById("progress_message").innerHTML = "Loading report"; |