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 |
|
|
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 |
|
|
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) { |
396 |
|
|
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 . qq{<span id="w$mfn" style="display: none;">Učitavanje podataka...</span>\n}; |
400 |
|
|
401 |
$html .= " " x $level . |
$html .= " " x $level . |
402 |
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" style="margin: 0;" frameborder="0" border="0" onLoad="iframe_resize(this.name);"></iframe>\n}; |
403 |
@{$self->{'iframe_mfn'}->{$mfn}} = @{$self->{'mfn_arr'}}; |
@{$self->{'iframe_mfn'}->{$mfn}} = @{$self->{'mfn_arr'}}; |
404 |
|
|
405 |
} else { |
} else { |
407 |
$html .= $self->unroll($next_level, $have_children, $base_path); |
$html .= $self->unroll($next_level, $have_children, $base_path); |
408 |
} |
} |
409 |
|
|
410 |
$html .= " " x $level . qq{</ul>\n}; |
$html .= " " x $level . qq{</$level_el>\n}; |
411 |
|
|
412 |
} |
} |
413 |
} |
} |
441 |
print JS "var show = ['",join("','",@{$self->{'show_ids'}}),"'];\n"; |
print JS "var show = ['",join("','",@{$self->{'show_ids'}}),"'];\n"; |
442 |
print JS "var hide = ['",join("','",@{$self->{'hide_ids'}}),"'];\n"; |
print JS "var hide = ['",join("','",@{$self->{'hide_ids'}}),"'];\n"; |
443 |
|
|
444 |
print JS "var mfn_iframe = [\n"; |
my @mfn_iframe; |
445 |
|
|
446 |
foreach my $if (keys %{$self->{'iframe_mfn'}}) { |
foreach my $if (keys %{$self->{'iframe_mfn'}}) { |
447 |
# print JS " ",join(",",map { "[$_:$if]" } @{$self->{'iframe_mfn'}->{$if}}),",\n"; |
push @mfn_iframe, join(",", map { "$_:$if" } @{$self->{'iframe_mfn'}->{$if}}); |
448 |
} |
} |
449 |
print JS " null\n]\n"; |
|
450 |
|
print JS "var mfn_iframe = {\n",join(",\n",@mfn_iframe),"\n};\n"; |
451 |
|
|
452 |
close(JS); |
close(JS); |
453 |
|
|