use popup_link element for phonenumber.html silly vonage popup
authorivan <ivan>
Tue, 1 Apr 2008 03:49:17 +0000 (03:49 +0000)
committerivan <ivan>
Tue, 1 Apr 2008 03:49:17 +0000 (03:49 +0000)
httemplate/elements/phonenumber.html

index b1ae2aa..60414a6 100644 (file)
@@ -1,15 +1,24 @@
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws_iframe.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/overlibmws_draggable.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="<%$fsurl%>elements/iframecontentmws.js"></SCRIPT>
+<% include('/elements/init_overlib.html') %>
 
 % if ( length($number) ) { 
 
-  <% $number %>
+    <% $number %>
 
 %   if ( $opt{'callable'} && $curuser->option('vonage-username') ) { 
 
-      <A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('https://secure.click2callu.com/tpcc/makecall?username=<% uri_escape($curuser->option('vonage-username')) %>&password=<% uri_escape($curuser->option('vonage-password')) %>&fromnumber=<% uri_escape($curuser->option('vonage-fromnumber')) %>&tonumber=1<% $snumber %>', 240, 64, 'call_popup'), CAPTION, 'Initiating call', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE, WIDTH, 240, HEIGHT, 64 ); return false;" TITLE="Call this number"><IMG SRC="<%$fsurl%>images/red_telephone_mimooh_01.png" BORDER=0 ALT="Call this number"></A>
+      <% include('/elements/popup_link.html',
+           'action'      =>
+             'https://secure.click2callu.com/tpcc/makecall'.
+             '?username='. uri_escape($curuser->option('vonage-username')).
+             '&password='. uri_escape($curuser->option('vonage-password')).
+             "&fromnumber=$vonage_number".
+             "&tonumber=$snumber",
+           'width'       => 240,
+           'height'      => 64,
+           'actionlabel' => 'Initiating call',
+           'label'       => qq!<IMG SRC="${fsurl}images/red_telephone_mimooh_01.png" BORDER=0 ALT="Call this number">!,
+         )
+      %>
 
 %   } 
 %