/[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 575 by dpavlin, Mon Nov 1 18:00:26 2004 UTC revision 576 by dpavlin, Mon Nov 1 22:13:07 2004 UTC
# Line 328  sub unroll { Line 328  sub unroll {
328    
329                          $log->debug("$code -> $v900 : $term [$mfn]");                          $log->debug("$code -> $v900 : $term [$mfn]");
330    
331                          my ($link_start,$link_end) = ('','');                          my ($link_start,$link_end,$level_el) = ('','','ul');
332                    
333                          my $have_children = $tree->[$level]->{'have_children'}->($code,$v900);                          my $have_children = $tree->[$level]->{'have_children'}->($code,$v900);
334    
# Line 347  sub unroll { Line 347  sub unroll {
347                                          my $url = $self->{'nodes_dir'} || $log->logdie("no nodes_dir?");                                          my $url = $self->{'nodes_dir'} || $log->logdie("no nodes_dir?");
348                                          $url .= "/${mfn}.html";                                          $url .= "/${mfn}.html";
349                                          $link_start = qq{<a href="#mfn$mfn" onClick="iframe_load('i$mfn','$url'); return toggle_display('id$mfn');">};                                          $link_start = qq{<a href="#mfn$mfn" onClick="iframe_load('i$mfn','$url'); return toggle_display('id$mfn');">};
350                                            $level_el = 'div';
351                                  }                                  }
352                          }                          }
353    
# Line 372  sub unroll { Line 373  sub unroll {
373                          my $style = $tree->[$level]->{'style'};                          my $style = $tree->[$level]->{'style'};
374    
375                          $html .= " " x $level .                          $html .= " " x $level .
376                                  qq{<ul id="id$mfn"}.                                  qq{<$level_el id="id$mfn"}.
377                                  ($style ? ' style="'.$style.'"' : '').                                  ($style ? ' style="'.$style.';"' : '').
378                                  qq{>\n};                                  qq{>\n};
379    
380                          if ($style) {                          if ($style) {
# Line 396  sub unroll { Line 397  sub unroll {
397                                  # unroll to separate file                                  # unroll to separate file
398                                  $self->{'node_html'}->{$mfn} = $self->unroll($next_level, $have_children, $self->{'iframe_base'});                                  $self->{'node_html'}->{$mfn} = $self->unroll($next_level, $have_children, $self->{'iframe_base'});
399                                  $html .= " " x $level .                                  $html .= " " x $level .
400                                  qq{<iframe id="i$mfn" name="i$mfn" width="100%" height="0" frameborder="0" border="0" onLoad="iframe_resize(this.name);"></iframe>};                                  qq{<iframe id="i$mfn" name="i$mfn" width="100%" height="0" marginwidth="0" marginheight="0" frameborder="1" border="0" onLoad="iframe_resize(this.name);"></iframe>\n};
401                                  @{$self->{'iframe_mfn'}->{$mfn}} = @{$self->{'mfn_arr'}};                                  @{$self->{'iframe_mfn'}->{$mfn}} = @{$self->{'mfn_arr'}};
402    
403                          } else {                          } else {
# Line 404  sub unroll { Line 405  sub unroll {
405                                  $html .= $self->unroll($next_level, $have_children, $base_path);                                  $html .= $self->unroll($next_level, $have_children, $base_path);
406                          }                          }
407    
408                          $html .= " " x $level . qq{</ul>\n};                          $html .= " " x $level . qq{</$level_el>\n};
409    
410                  }                  }
411          }          }

Legend:
Removed from v.575  
changed lines
  Added in v.576

  ViewVC Help
Powered by ViewVC 1.1.26