/[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 492 by dpavlin, Sat Oct 9 21:48:30 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 253  sub unroll { Line 256  sub unroll {
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                                  $html .= " " x $level .                                  $html .= " " x $level .
259                                          qq{<li>${link_start}<span id="o$mfn">${term}</span>${link_end}}.                                          qq{<li><a name="mfn${mfn}"></a>${link_start}<span id="o$mfn">${term}</span>${link_end}}.
260                                          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);">&raquo;</a></li>\n};
261                          } else {                          } else {
262                                  $log->warn("file 'out/$mfn_link' doesn't exist, skipping");                                  $log->warn("file 'out/$mfn_link' doesn't exist, skipping");
# Line 265  sub unroll { Line 268  sub unroll {
268                          my $style = $tree->[$level]->{'style'};                          my $style = $tree->[$level]->{'style'};
269    
270                          $html .= " " x $level .                          $html .= " " x $level .
271                                  qq{<a name="mfn$mfn"></a>\n <ul id="id$mfn"}.                                  qq{<ul id="id$mfn"}.
272                                  ($style ? ' style="'.$style.'"' : '').                                  ($style ? ' style="'.$style.'"' : '').
273                                  qq{>\n};                                  qq{>\n};
274    

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

  ViewVC Help
Powered by ViewVC 1.1.26