/[webpac]/trunk2/lib/WebPAC/Tree.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk2/lib/WebPAC/Tree.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 471 by dpavlin, Sun Sep 26 15:11:36 2004 UTC revision 529 by dpavlin, Tue Oct 19 16:30:12 2004 UTC
# Line 158  sub new { Line 158  sub new {
158    
159          my $html = $self->unroll(0,());          my $html = $self->unroll(0,());
160    
161          $log->logdie("no html generated by unroll...") unless ($html);          if (! $html) {
162                    $log->warn("no html generated by unroll...");
163                    return;
164            }
165    
166          my $html_file = $self->{'dir'}.'/'.$self->{'html'};          my $html_file = $self->{'dir'}.'/'.$self->{'html'};
167    
# Line 237  sub unroll { Line 240  sub unroll {
240    
241                          $log->debug("$code -> $v900 : $term [$mfn]");                          $log->debug("$code -> $v900 : $term [$mfn]");
242    
243                          my ($link_start,$link_end) = ('<a name="mfn'.$mfn.'"></a>','');                          my ($link_start,$link_end) = ('','');
244                    
245                          my $have_children = $tree->[$level]->{'have_children'}->($code,$v900);                          my $have_children = $tree->[$level]->{'have_children'}->($code,$v900);
246    
# Line 252  sub unroll { Line 255  sub unroll {
255    
256                          my $mfn_link = "thes/$mfn.html";                          my $mfn_link = "thes/$mfn.html";
257                          if (-e "out/$mfn_link") {                          if (-e "out/$mfn_link") {
258                                    $term =~ s# *\* *# <img src="img/crovoc.png" border="0">#;
259                                  $html .= " " x $level .                                  $html .= " " x $level .
260                                          qq{<li>${link_start}<span id="o$mfn">${term}</span>${link_end}}.                                          qq{<li>${link_start}<span id="o$mfn">${term}</span>${link_end}}.
261                                          qq{&nbsp;<a href="$mfn_link" onClick="javascript:return popup(this);">&raquo;</a></li>\n};                                          qq{&nbsp;<a href="$mfn_link" onClick="javascript:return popup(this);"><img src="img/listic.png" border="0"></a></li>\n};
262                          } else {                          } else {
263                                  $log->warn("file 'out/$mfn_link' doesn't exist, skipping");                                  $log->warn("file 'out/$mfn_link' doesn't exist, skipping");
264                          }                          }
# Line 265  sub unroll { Line 269  sub unroll {
269                          my $style = $tree->[$level]->{'style'};                          my $style = $tree->[$level]->{'style'};
270    
271                          $html .= " " x $level .                          $html .= " " x $level .
272                                  qq{<a name="mfn$mfn"></a>\n <ul id="id$mfn"}.                                  qq{<ul id="id$mfn"}.
273                                  ($style ? ' style="'.$style.'"' : '').                                  ($style ? ' style="'.$style.'"' : '').
274                                  qq{>\n};                                  qq{>\n};
275    

Legend:
Removed from v.471  
changed lines
  Added in v.529

  ViewVC Help
Powered by ViewVC 1.1.26