X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fpopup_link.html;fp=httemplate%2Felements%2Fpopup_link.html;h=0915bfa6887d43698d263ec0eeb5b3473a82fa4a;hp=556e19ebe3bcaa15257456e45f7111fe18dc0ad7;hb=41ab1bbaf58292688e1e84ab153059896f17a5d4;hpb=a2649b652a3db877b105b4bea5b34727dbcb914f diff --git a/httemplate/elements/popup_link.html b/httemplate/elements/popup_link.html index 556e19ebe..0915bfa68 100644 --- a/httemplate/elements/popup_link.html +++ b/httemplate/elements/popup_link.html @@ -21,16 +21,11 @@ Example: } ) -% if ($action && $label) { +% if ($params->{'action'} && $label) { <% $label %>\ % } <%init> -my($action, $label, $actionlabel) = ( '', '', '' ); -my $closetext = 'Close'; -my $width = 540; -my $color = '#333399'; - my $params; if (ref($_[0]) eq 'HASH') { #$params = { %$params, %{ $_[0] } }; @@ -40,17 +35,7 @@ if (ref($_[0]) eq 'HASH') { $params = { @_ }; } -$action = $params->{'action'} if exists $params->{'action'}; -$label = $params->{'label'} if exists $params->{'label'}; -$actionlabel = $params->{'actionlabel'} if exists $params->{'actionlabel'}; -$width = $params->{'width'} if exists $params->{'width'}; -$color = $params->{'color'} if exists $params->{'color'}; -$closetext = $params->{'closetext'} if exists $params->{'closetext'}; - -#stupid safari is caching the "location" of popup iframs, and submitting them -#instead of displaying them. this should prevent that. -my $popup_name = 'popup-'.time. "-$$-". rand() * 2**32; - -my $onclick = "overlib( OLiframeContent('$action', $width, 336, '$popup_name' ), CAPTION, '$actionlabel', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '$color', CGCOLOR, '$color', CLOSETEXT, '$closetext' ); return false;"; +my $label = $params->{'label'}; +my $onclick = include('/elements/popup_link_onclick.html', $params);