From d6047391feb3236374e16fd73240d9821d77fe06 Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 20 Feb 2005 08:44:40 +0000 Subject: use a javascript layer instead of a browser popup (popup blockers), really generalize the progressbar code to make it easy to use as a component --- httemplate/elements/progress-popup.html | 74 +++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 httemplate/elements/progress-popup.html (limited to 'httemplate/elements/progress-popup.html') diff --git a/httemplate/elements/progress-popup.html b/httemplate/elements/progress-popup.html new file mode 100644 index 000000000..0881a9643 --- /dev/null +++ b/httemplate/elements/progress-popup.html @@ -0,0 +1,74 @@ +<% + my( $jobnum ) = $cgi->param('jobnum'); + my( $url ) = $cgi->param('url'); +%> + + + + + + + + + + + + + + + + + + + + + + +
+ Server processing job... +
+ +
+
%
+
+ (progress of job #<%= $jobnum %>) +
+ + + + -- cgit v1.2.1 From 4d599c8ce382f51d7bfbb4172cdc73a2c8bd400d Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 24 Feb 2005 14:24:07 +0000 Subject: add progressbar to service definition add - duplicate checking can take a while, closes: Bug#1126 --- httemplate/elements/progress-popup.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'httemplate/elements/progress-popup.html') diff --git a/httemplate/elements/progress-popup.html b/httemplate/elements/progress-popup.html index 0881a9643..d180c17d4 100644 --- a/httemplate/elements/progress-popup.html +++ b/httemplate/elements/progress-popup.html @@ -1,6 +1,7 @@ <% - my( $jobnum ) = $cgi->param('jobnum'); - my( $url ) = $cgi->param('url'); + my $jobnum = $cgi->param('jobnum'); + my $url = $cgi->param('url'); + my $formname = scalar($cgi->param('formname')); %> @@ -34,7 +35,7 @@ function updateStatus( status_statustext ) { document.getElementById("progress_bar").innerHTML = ''; document.getElementById("progress_percent").innerHTML = ''; document.getElementById("progress_jobnum").innerHTML = ''; - parent.document.OneTrueForm.submit.disabled=false; + parent.document.<%=$formname%>.submit.disabled=false; } else { alert('XXX unknown status returned from server: ' + status); } -- cgit v1.2.1 From 684a478c0f88e5bf6d1d3f32f4618089146b5709 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Jun 2005 09:29:56 +0000 Subject: 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 --- httemplate/elements/progress-popup.html | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'httemplate/elements/progress-popup.html') diff --git a/httemplate/elements/progress-popup.html b/httemplate/elements/progress-popup.html index d180c17d4..20bb5fc5a 100644 --- a/httemplate/elements/progress-popup.html +++ b/httemplate/elements/progress-popup.html @@ -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')); %> @@ -29,7 +30,17 @@ function updateStatus( status_statustext ) { 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 = ''; + 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 = 'Error: ' + statustext + ''; document.getElementById("progress_bar").innerHTML = ''; -- cgit v1.2.1 From 76161f1a2ae0f96470bed4089b00eff5abb16cff Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 25 Sep 2005 08:13:36 +0000 Subject: get rid of JSRS iframe foo for progress bar, use XMLHTTPRequest instead. really should have done that in the first place. JSON will wait until another day... --- httemplate/elements/progress-popup.html | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'httemplate/elements/progress-popup.html') diff --git a/httemplate/elements/progress-popup.html b/httemplate/elements/progress-popup.html index 20bb5fc5a..200f97d9b 100644 --- a/httemplate/elements/progress-popup.html +++ b/httemplate/elements/progress-popup.html @@ -10,25 +10,35 @@ - +<%= include('/elements/xmlhttp.html', + 'url' => $p.'elements/jsrsServer.html', + 'subs' => [ 'job_status' ], + ) +%>