[freeside-commits] freeside/httemplate/browse cust_main_county.cgi, 1.16.2.2, 1.16.2.3
Ivan,,,
ivan at wavetail.420.am
Mon Mar 31 14:11:06 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv13173/browse
Modified Files:
Tag: FREESIDE_1_7_BRANCH
cust_main_county.cgi
Log Message:
fix safari weirdness with caching iframes and auto-submitting them (in tax editor at least)
Index: cust_main_county.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/cust_main_county.cgi,v
retrieving revision 1.16.2.2
retrieving revision 1.16.2.3
diff -u -d -r1.16.2.2 -r1.16.2.3
--- cust_main_county.cgi 20 Feb 2008 01:19:45 -0000 1.16.2.2
+++ cust_main_county.cgi 31 Mar 2008 21:11:04 -0000 1.16.2.3
@@ -85,17 +85,31 @@
my $edit_onclick = sub {
my $row = shift;
my $taxnum = $row->taxnum;
- my $color = '#333399';
- qq!overlib( OLiframeContent('${p}edit/cust_main_county.html?$taxnum', 540, 420, 'edit_cust_main_county_popup' ), CAPTION, 'Edit tax rate', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '$color', CGCOLOR, '$color' ); return false;!;
+ include( '/elements/popup_link_onclick.html',
+ 'action' => "${p}edit/cust_main_county.html?$taxnum",
+ 'actionlabel' => 'Edit tax rate',
+ 'height' => 420,
+ #default# 'width' => 540,
+ #default# 'color' => '#333399',
+ );
};
sub expand_link {
- my( $row, $desc ) = @_;
- my $taxnum = $row->taxnum;
+ my %param = @_;
+
+ my $taxnum = $param{'row'}->taxnum;
my $url = "${p}edit/cust_main_county-expand.cgi?$taxnum";
- my $color = '#333399';
- qq!<FONT SIZE="-1"><A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('$url', 540, 420, 'edit_cust_main_county_popup' ), CAPTION, '$desc', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, BGCOLOR, '$color', CGCOLOR, '$color' ); return false;">!;
+ '<FONT SIZE="-1">'.
+ include( '/elements/popup_link.html',
+ 'label' => $param{'label'},
+ 'action' => $url,
+ 'actionlabel' => $param{'desc'},
+ 'height' => 420,
+ #default# 'width' => 540,
+ #default# 'color' => '#333399',
+ ).
+ '</FONT>';
}
sub separate_taxclasses_link {
@@ -227,13 +241,17 @@
sub { state_label($_[0]->state, $_[0]->country).
( $_[0]->state
? ''
- : ' '. expand_link($_[0], 'Add States').
- 'add states</A></FONT>'
+ : ' '. expand_link( desc => 'Add States',
+ row => $_[0],
+ label => 'add states',
+ )
)
},
sub { $_[0]->county || '(all) '.
- expand_link($_[0], 'Add Counties').
- 'add counties</A></FONT>'
+ expand_link( desc => 'Add Counties',
+ row => $_[0],
+ label => 'add counties',
+ )
},
);
More information about the freeside-commits
mailing list