X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fsearch-html.html;h=10cc955396ae53dc5b5ae0428ed9b56150063b26;hb=2aa9fa43c09a1ce4474785dbdc3d462e7b23ea15;hp=d7e81282b83d49f8a7140b8e2673f7e352945a49;hpb=3185fe4edea62dd3fa9818cf80902e96fe2a2d21;p=freeside.git diff --git a/httemplate/search/elements/search-html.html b/httemplate/search/elements/search-html.html index d7e81282b..10cc95539 100644 --- a/httemplate/search/elements/search-html.html +++ b/httemplate/search/elements/search-html.html @@ -253,12 +253,29 @@ % $bgcolor = $bgcolor1; % } - +% my $rowstyle = ''; +% if ( $row eq $opt{'footer_data'} ) { +% $rowstyle = ' STYLE="border-top: dashed 1px black; font-style: italic"'; +% $bgcolor = '#dddddd'; +% } + +% my $trid = ''; +% if ( $opt{'link_field' } ) { +% my $link_field = $opt{'link_field'}; +% if ( ref($link_field) eq 'CODE' ) { +% $trid = &{$link_field}($row); +% } else { +% $trid = $row->$link_field(); +% } +% } + > + % if ( $opt{'fields'} ) { % % my $links = $opt{'links'} ? [ @{$opt{'links'}} ] : ''; % my $onclicks = $opt{'link_onclicks'} ? [ @{$opt{'link_onclicks'}} ] : []; +% my $tooltips = $opt{'tooltips'} ? [ @{$opt{'tooltips'}} ] : []; % my $aligns = $opt{'align'} ? [ @{$opt{'align'}} ] : ''; % my $colors = $opt{'color'} ? [ @{$opt{'color'}} ] : []; % my $sizes = $opt{'size'} ? [ @{$opt{'size'}} ] : []; @@ -341,9 +358,9 @@ % $_ =~ /^\d+$/ ) { % # for the 'straight SQL' case: specify fields % # by position -% $row->[$_]; +% encode_entities($row->[$_]); % } else { -% $row->$_(); +% encode_entities($row->$_()); % } % } % @{$opt{'fields'}} @@ -360,6 +377,7 @@ % if ( $links ) { % my $link = shift @$links; % my $onclick = shift @$onclicks; +% my $tooltip = shift @$tooltips; % % if ( ! $opt{'agent_virt'} % || ( $null_link && ! $row->agentnum ) @@ -374,6 +392,14 @@ % if ref($onclick) eq 'CODE'; % $onclick = qq( onClick="$onclick") if $onclick; % +% $tooltip = &{$tooltip}($row) +% if ref($tooltip) eq 'CODE'; +% $tooltip = qq! id="a$id" !. +% qq! onmouseover="return overlib(!. +% $m->interp->apply_escapes($tooltip, 'h', 'js_string'). +% qq!, FGCLASS, 'tooltip', REF, 'a$id', !. +% qq!REFC, 'LL', REFP, 'UL')"! if $tooltip; +% % if ( $link ) { % my( $url, $method ) = @{$link}; % if ( ref($method) eq 'CODE' ) { @@ -381,11 +407,16 @@ % } else { % $a = $url. $row->$method(); % } -% $a = qq(); +% $a = qq(); % } % elsif ( $onclick ) { % $a = qq(); % } +% elsif ( $tooltip ) { +% $a = qq(); +% } +% $id++; + % } % % } @@ -415,7 +446,7 @@ % $cstyle = qq(STYLE="$cstyle") % if $cstyle; - <% $cstyle %>><% $font %><% $a %><% $s %><% $field %><% $es %><% $a ? '' : '' %><% $font ? '' : '' %> + <% $cstyle %>><% $a %><% $font %><% $s %><% $field %><% $es %><% $font ? '' : '' %><% $a ? '' : '' %> % } % @@ -499,4 +530,5 @@ $count_sth->execute my $count_arrayref = $count_sth->fetchrow_arrayref; my $total = $count_arrayref->[0]; +my $id = 0;