X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fpopup_link_onclick.html;h=5173115a5045fbb5e5bc0913878995910716affa;hb=191a9fb439b8ed15fdcd458dd51f5890dbf60f29;hp=f539f4bbdee4cd5be2f1767e1ea4110bb54b9b33;hpb=aa66a7eabb48a200c59bcb4dd2fb30f12e279ded;p=freeside.git diff --git a/httemplate/elements/popup_link_onclick.html b/httemplate/elements/popup_link_onclick.html index f539f4bbd..5173115a5 100644 --- a/httemplate/elements/popup_link_onclick.html +++ b/httemplate/elements/popup_link_onclick.html @@ -8,6 +8,9 @@ Example: #required 'action' => 'content.html', # uri for content of popup + + #alternately, use instead of action + 'js_action' => 'url', # javascript variable or expression #strongly recommended 'actionlabel => 'You clicked', # popup title @@ -28,13 +31,13 @@ Example: % if ($action) { -<% $onclick %>\ +<% $onclick |n %>\ % } <%init> my( $action, $actionlabel, $frame ) = ( '', '', '' ); my( $width, $height ) = ( 540, 336 ); -my $closetext = 'Close'; +my $closetext = emt('Close'); my $color = '#333399'; my $scrolling = 'auto'; @@ -47,7 +50,8 @@ if (ref($_[0]) eq 'HASH') { $params = { @_ }; } -$action = $params->{'action'} if exists $params->{'action'}; +$action = q(') . $params->{'action'} . q(') if exists $params->{'action'}; +$action = $params->{'js_action'} if exists $params->{'js_action'}; $actionlabel = $params->{'actionlabel'} if exists $params->{'actionlabel'}; $width = $params->{'width'} if exists $params->{'width'}; $height = $params->{'height'} if exists $params->{'height'}; @@ -61,7 +65,7 @@ $scrolling = $params->{'scrolling'} if exists $params->{'scrolling'}; my $popup_name = 'popup-'.time. "-$$-". rand() * 2**32; my $onclick = - "overlib( OLiframeContent('$action', $width, $height, '$popup_name', 0, '$scrolling' ), ". + "overlib( OLiframeContent($action, $width, $height, '$popup_name', 0, '$scrolling' ), ". "CAPTION, '$actionlabel', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, ". "DRAGGABLE, CLOSECLICK, ". "BGCOLOR, '$color', CGCOLOR, '$color', CLOSETEXT, '$closetext'".