diff options
-rw-r--r-- | httemplate/edit/cust_main/billing.html | 11 | ||||
-rw-r--r-- | httemplate/elements/init_overlib.html | 9 | ||||
-rw-r--r-- | httemplate/misc/payment.cgi | 12 |
3 files changed, 12 insertions, 20 deletions
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 6ed35c15a..6b1c2a86f 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -107,16 +107,7 @@ </SCRIPT> - <SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws.js"></SCRIPT> - <SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws_iframe.js"></SCRIPT> - <SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws_draggable.js"></SCRIPT> - <SCRIPT TYPE="text/javascript"> - function OLiframeContent(src, width, height, name) { - return ('<iframe src="'+src+'" width="'+width+'" height="'+height+'"' - +(name?' name="'+name+'" id="'+name+'"':'')+' scrolling="auto">' - +'<div>[iframe not supported]</div></iframe>'); - } - </SCRIPT> + <% include('/elements/init_overlib.html') %> % my $payby = $cust_main->payby; % my $paytype = $cust_main->paytype; diff --git a/httemplate/elements/init_overlib.html b/httemplate/elements/init_overlib.html new file mode 100644 index 000000000..12084f61c --- /dev/null +++ b/httemplate/elements/init_overlib.html @@ -0,0 +1,9 @@ +% for my $file (@files) { + <SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/<%$file%>.js"></SCRIPT> +% } +<%init> + +my @files = map "overlibmws$_", ( '', qw( _iframe _draggable _crossframe ) ); +push @files, 'iframecontentmws'; + +</%init> diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index f99f2f068..7546a858a 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -6,16 +6,8 @@ <INPUT TYPE="hidden" NAME="payunique" VALUE="<% $payunique %>"> <INPUT TYPE="hidden" NAME="balance" VALUE="<% $balance %>"> -<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws.js"></SCRIPT> -<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws_iframe.js"></SCRIPT> -<SCRIPT TYPE="text/javascript" SRC="../elements/overlibmws_draggable.js"></SCRIPT> -<SCRIPT TYPE="text/javascript"> -function OLiframeContent(src, width, height, name) { - return ('<iframe src="'+src+'" width="'+width+'" height="'+height+'"' - +(name?' name="'+name+'" id="'+name+'"':'')+' scrolling="auto">' - +'<div>[iframe not supported]</div></iframe>'); -} -</SCRIPT> +<% include('/elements/init_overlib.html') %> + % #include( '/elements/table.html', '#cccccc' ) <% ntable('#cccccc') %> |