projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
#21564: user interface for REST client
[freeside.git]
/
httemplate
/
elements
/
popup_link_onclick.html
diff --git
a/httemplate/elements/popup_link_onclick.html
b/httemplate/elements/popup_link_onclick.html
index
f539f4b
..
612de75
100644
(file)
--- 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
#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
#strongly recommended
'actionlabel => 'You clicked', # popup title
@@
-28,13
+31,13
@@
Example:
</%doc>
% if ($action) {
</%doc>
% if ($action) {
-<% $onclick %>\
+<% $onclick
|n
%>\
% }
<%init>
my( $action, $actionlabel, $frame ) = ( '', '', '' );
my( $width, $height ) = ( 540, 336 );
% }
<%init>
my( $action, $actionlabel, $frame ) = ( '', '', '' );
my( $width, $height ) = ( 540, 336 );
-my $closetext =
'Close'
;
+my $closetext =
emt('Close')
;
my $color = '#333399';
my $scrolling = 'auto';
my $color = '#333399';
my $scrolling = 'auto';
@@
-47,7
+50,8
@@
if (ref($_[0]) eq 'HASH') {
$params = { @_ };
}
$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'};
$actionlabel = $params->{'actionlabel'} if exists $params->{'actionlabel'};
$width = $params->{'width'} if exists $params->{'width'};
$height = $params->{'height'} if exists $params->{'height'};
@@
-58,13
+62,14
@@
$scrolling = $params->{'scrolling'} if exists $params->{'scrolling'};
#stupid safari is caching the "location" of popup iframs, and submitting them
#instead of displaying them. this should prevent that.
#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 $popup_name = 'popup-'.
random_id()
;
my $onclick =
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, ".
"CAPTION, '$actionlabel', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, ".
"DRAGGABLE, CLOSECLICK, ".
- "BGCOLOR, '$color', CGCOLOR, '$color', CLOSETEXT, '$closetext'".
+ "BGCOLOR, '$color', CGCOLOR, '$color', FGCOLOR, '#f8f8f8', ".
+ "CLOSETEXT, '$closetext'".
( $frame ? ", FRAME, $frame" : '' ).
");";
( $frame ? ", FRAME, $frame" : '' ).
");";