freeside/httemplate/elements progress-popup.html,1.2,1.3 progress-init.html,1.2,1.3
Ivan Kohler
ivan at pouncequick.420.am
Thu Jun 2 02:29:59 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory pouncequick:/tmp/cvs-serv23604/httemplate/elements
Modified Files:
progress-popup.html progress-init.html
Log Message:
add ability to search on a date range of invoice events and then reprint or reemail (boy was that a bit more work than i expected), closes: Bug#946
Index: progress-init.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/progress-init.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- progress-init.html 24 Feb 2005 14:22:02 -0000 1.2
+++ progress-init.html 2 Jun 2005 09:29:55 -0000 1.3
@@ -1,6 +1,14 @@
<%
- my( $formname, $fields, $action, $success_url, $key ) = @_;
+ my( $formname, $fields, $action, $url_or_message, $key ) = @_;
$key = '' unless defined $key;
+
+ my $url_or_message_link;
+ if ( ref($url_or_message) ) { #its a message or something
+ $url_or_message_link =
+ 'message='. uri_escape( $url_or_message->{'message'} )
+ } else {
+ $url_or_message_link = "url=$url_or_message";
+ }
%>
<SCRIPT TYPE="text/javascript" SRC="../elements/jsrsClient.js"></SCRIPT>
@@ -52,7 +60,7 @@
function <%=$key%>myCallback( jobnum ) {
- overlib( OLiframeContent('<%=$p%>elements/progress-popup.html?jobnum=' + jobnum + ';url=<%=$success_url%>;formname=<%=$formname%>' , 432, 136, 'progress_popup'), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 );
+ overlib( OLiframeContent('<%=$p%>elements/progress-popup.html?jobnum=' + jobnum + ';<%=$url_or_message_link%>;formname=<%=$formname%>' , 432, 136, 'progress_popup'), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 );
}
Index: progress-popup.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/progress-popup.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- progress-popup.html 24 Feb 2005 14:22:02 -0000 1.2
+++ progress-popup.html 2 Jun 2005 09:29:55 -0000 1.3
@@ -1,6 +1,7 @@
<%
my $jobnum = $cgi->param('jobnum');
my $url = $cgi->param('url');
+ my $message = $cgi->param('message');
my $formname = scalar($cgi->param('formname'));
%>
<HTML>
@@ -29,7 +30,17 @@
bar1.update;
jsrsExecute( '<%=$p%>elements/jsrsServer.html', updateStatus, 'job_status', '<%= $jobnum %>' );
} else if ( status.indexOf('complete') > -1 ) {
+<% if ( $message ) { %>
+ document.getElementById("progress_message").innerHTML = "<%= $message %>";
+ document.getElementById("progress_bar").innerHTML = '';
+ document.getElementById("progress_percent").innerHTML = '<INPUT TYPE="button" VALUE="OK" onClick="parent.nd(1);">';
+ document.getElementById("progress_jobnum").innerHTML = '';
+ parent.document.<%=$formname%>.submit.disabled=false;
+<% } elsif ( $url ) { %>
window.top.location.href = '<%= $url %>';
+<% } else { %>
+ alert('job done but no url or message specified');
+<% } %>
} else if ( status.indexOf('error') > -1 ) {
document.getElementById("progress_message").innerHTML = '<FONT SIZE="+1" COLOR="#FF0000">Error: ' + statustext + '</FONT>';
document.getElementById("progress_bar").innerHTML = '';
More information about the freeside-commits
mailing list