summaryrefslogtreecommitdiff
path: root/httemplate/elements
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-02-21 13:14:28 -0800
committerIvan Kohler <ivan@freeside.biz>2015-02-21 13:14:28 -0800
commit5f10fda22d066f3e730db11b7c26938547014631 (patch)
tree93330009920acb189dd62b570dbc8664077c1107 /httemplate/elements
parent0491e1283637a9a89cc953b2a47f24f4e8795006 (diff)
parent49deddfdc5f60c5cde01a5152e6bae858ed8e72a (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/elements')
-rw-r--r--httemplate/elements/change_history_common.html5
-rw-r--r--httemplate/elements/popup_link_onclick.html8
2 files changed, 10 insertions, 3 deletions
diff --git a/httemplate/elements/change_history_common.html b/httemplate/elements/change_history_common.html
index 9fc85aa53..2d2c4c0be 100644
--- a/httemplate/elements/change_history_common.html
+++ b/httemplate/elements/change_history_common.html
@@ -191,7 +191,10 @@ my %h_table_labelsub = (
my $discounts = {};
my $discount_descripsub = sub {
my($item) = @_;
- $pkgpart{$item->pkgpart} ||= $item->part_pkg->pkg;
+ $pkgpart{$item->pkgpart} ||= qsearchs({
+ 'table' => 'part_pkg',
+ 'hashref' => {'pkgpart' => $item->pkgpart}
+ })->pkg;
my $dnum = $item->discountnum;
$discounts->{$dnum} ||= qsearchs({
'table'=>'discount',
diff --git a/httemplate/elements/popup_link_onclick.html b/httemplate/elements/popup_link_onclick.html
index 961f62336..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
@@ -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'".