From 5f155263a2c9837640d2fab0817d1f36b8cb3f8c Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 10 Mar 2006 22:30:48 +0000 Subject: fix to (hopefully) allow multiple progress-init's in a page, also add second $cgi arg to all these progressbar calls... --- httemplate/elements/progress-init.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'httemplate/elements/progress-init.html') diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index 7844f5678..ba9f6edd6 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -14,7 +14,7 @@ <%= include('/elements/xmlhttp.html', 'method' => 'POST', 'url' => $action, - 'subs' => [ 'start_job' ], + 'subs' => [ $key.'start_job' ], ) %> @@ -32,7 +32,7 @@ function <%=$key%>process () { document.<%=$formname%>.submit.disabled=true; - overlib( 'Submitting job to server...', WIDTH, 432, HEIGHT, 136, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); + overlib( 'Submitting job to server...', WIDTH, 444, HEIGHT, 168, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); var Hash = new Array(); var x = 0; @@ -68,13 +68,13 @@ function <%=$key%>process () { //alert('start_job( ' + Hash + ', <%=$key%>myCallback )' ); //alert('start_job()' ); - start_job( Hash, <%=$key%>myCallback ); + <%=$key%>start_job( Hash, <%=$key%>myCallback ); } function <%=$key%>myCallback( jobnum ) { - 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 ); + overlib( OLiframeContent('<%=$p%>elements/progress-popup.html?jobnum=' + jobnum + ';<%=$url_or_message_link%>;formname=<%=$formname%>' , 444, 168, 'progress_popup'), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); } -- cgit v1.2.1 From 36d9b47e5c20ae3bc71c0bd0eaf289b566d0cf7c Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 11 Mar 2006 05:21:20 +0000 Subject: fix the progressbar bug with multiple progressbar forms on a page --- httemplate/elements/progress-init.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'httemplate/elements/progress-init.html') diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index ba9f6edd6..efebe48e9 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -14,7 +14,8 @@ <%= include('/elements/xmlhttp.html', 'method' => 'POST', 'url' => $action, - 'subs' => [ $key.'start_job' ], + 'subs' => [ 'start_job' ], + 'key' => $key, ) %> -- cgit v1.2.1 From c1bc54f7523d2af6114d7445bbbe5618f1429794 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 13 Mar 2006 22:32:51 +0000 Subject: fix progress hoohaw for internet exploder again, whew. also make sure error/finish messages are centered, looks better --- httemplate/elements/progress-init.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'httemplate/elements/progress-init.html') diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index efebe48e9..ec485f438 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -31,7 +31,9 @@ function <%=$key%>process () { //alert('<%=$key%>process for form <%=$formname%>'); - document.<%=$formname%>.submit.disabled=true; + if ( document.<%=$formname%>.submit.disabled == false ) { + document.<%=$formname%>.submit.disabled=true; + } overlib( 'Submitting job to server...', WIDTH, 444, HEIGHT, 168, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); -- cgit v1.2.1 From 3ce7691203a7737406bf2d4442f7fd84b81f847e Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 23 Aug 2006 22:25:39 +0000 Subject: Will things ever be the same again? It's the final masonize --- httemplate/elements/progress-init.html | 51 +++++++++++++++++----------------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'httemplate/elements/progress-init.html') diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index ec485f438..3894feef9 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -1,17 +1,18 @@ -<% - my( $formname, $fields, $action, $url_or_message, $key ) = @_; - $key = '' unless defined $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"; +% } +% - 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"; - } -%> -<%= include('/elements/xmlhttp.html', +<% include('/elements/xmlhttp.html', 'method' => 'POST', 'url' => $action, 'subs' => [ 'start_job' ], @@ -27,12 +28,12 @@ function OLiframeContent(src, width, height, name) { +'
[iframe not supported]
'); } -function <%=$key%>process () { +function <%$key%>process () { - //alert('<%=$key%>process for form <%=$formname%>'); + //alert('<%$key%>process for form <%$formname%>'); - if ( document.<%=$formname%>.submit.disabled == false ) { - document.<%=$formname%>.submit.disabled=true; + if ( document.<%$formname%>.submit.disabled == false ) { + document.<%$formname%>.submit.disabled=true; } overlib( 'Submitting job to server...', WIDTH, 444, HEIGHT, 168, CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); @@ -40,9 +41,9 @@ function <%=$key%>process () { var Hash = new Array(); var x = 0; var fieldName; - for (var i = 0; i.elements.length; i++) { - field = document.<%=$formname%>.elements[i]; - if ( <%= join(' || ', map { "(field.name.indexOf('$_') > -1)" } @$fields ) %> + for (var i = 0; i.elements.length; i++) { + field = document.<%$formname%>.elements[i]; + if ( <% join(' || ', map { "(field.name.indexOf('$_') > -1)" } @$fields ) %> ) { if ( field.type == 'select-multiple' ) { @@ -56,7 +57,7 @@ function <%=$key%>process () { } } else if ( ( field.type != 'radio' && field.type != 'checkbox' ) || ( ( field.type == 'radio' || field.type == 'checkbox' ) - && document.<%=$formname%>.elements[i].checked + && document.<%$formname%>.elements[i].checked ) ) { @@ -67,17 +68,17 @@ function <%=$key%>process () { } // jsrsPOST = true; - // jsrsExecute( '<%= $action %>', <%=$key%>myCallback, 'start_job', Hash ); + // jsrsExecute( '<% $action %>', <%$key%>myCallback, 'start_job', Hash ); - //alert('start_job( ' + Hash + ', <%=$key%>myCallback )' ); + //alert('start_job( ' + Hash + ', <%$key%>myCallback )' ); //alert('start_job()' ); - <%=$key%>start_job( Hash, <%=$key%>myCallback ); + <%$key%>start_job( Hash, <%$key%>myCallback ); } -function <%=$key%>myCallback( jobnum ) { +function <%$key%>myCallback( jobnum ) { - overlib( OLiframeContent('<%=$p%>elements/progress-popup.html?jobnum=' + jobnum + ';<%=$url_or_message_link%>;formname=<%=$formname%>' , 444, 168, '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%>' , 444, 168, 'progress_popup'), CAPTION, 'Please wait...', STICKY, AUTOSTATUSCAP, CLOSETEXT, '', CLOSECLICK, MIDX, 0, MIDY, 0 ); } -- cgit v1.2.1 From a0a5a11af6648c147a1e68877ac099035c18790a Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 22 Jan 2007 11:30:21 +0000 Subject: use $fsurl instead of relative ../ addressing --- httemplate/elements/progress-init.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'httemplate/elements/progress-init.html') diff --git a/httemplate/elements/progress-init.html b/httemplate/elements/progress-init.html index 3894feef9..01bf85935 100644 --- a/httemplate/elements/progress-init.html +++ b/httemplate/elements/progress-init.html @@ -19,8 +19,8 @@ 'key' => $key, ) %> - - + + - + +