line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Widgets::NavMenu::Iterator::JQTreeView; |
2
|
|
|
|
|
|
|
$HTML::Widgets::NavMenu::Iterator::JQTreeView::VERSION = '1.0901'; |
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
25
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use HTML::Widgets::NavMenu::EscapeHtml qw/ escape_html /; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use parent qw(HTML::Widgets::NavMenu::Iterator::NavMenu); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _init |
11
|
|
|
|
|
|
|
{ |
12
|
20
|
|
|
20
|
|
29
|
my $self = shift; |
13
|
20
|
|
|
|
|
25
|
my $args = shift; |
14
|
|
|
|
|
|
|
|
15
|
20
|
|
|
|
|
55
|
$self->SUPER::_init($args); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Make a fresh copy just to be on the safe side. |
18
|
20
|
|
|
|
|
29
|
$self->_ul_classes( [ @{ $args->{'ul_classes'} } ] ); |
|
20
|
|
|
|
|
54
|
|
19
|
|
|
|
|
|
|
|
20
|
20
|
|
|
|
|
32
|
return 0; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _calc_open_li_tag |
25
|
|
|
|
|
|
|
{ |
26
|
17
|
|
|
17
|
|
22
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
17
|
|
|
|
|
31
|
my $id_attr = $self->_calc_li_id_attr(); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
return ( |
31
|
17
|
100
|
|
|
|
39
|
$self->_is_expanded_for_treeview() |
32
|
|
|
|
|
|
|
? (qq{}) |
33
|
|
|
|
|
|
|
: ("") |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
0
|
return; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub _start_handle_non_role |
41
|
|
|
|
|
|
|
{ |
42
|
17
|
|
|
17
|
|
23
|
my $self = shift; |
43
|
17
|
|
|
|
|
29
|
my $top_item = $self->top; |
44
|
17
|
|
|
|
|
31
|
my @tags_to_add = ( $self->_calc_open_li_tag(), $self->get_link_tag() ); |
45
|
17
|
100
|
66
|
|
|
41
|
if ( $top_item->_num_subs_to_go() && $self->_is_expanded() ) |
46
|
|
|
|
|
|
|
{ |
47
|
4
|
|
|
|
|
13
|
push @tags_to_add, ( $self->get_open_sub_menu_tags() ); |
48
|
|
|
|
|
|
|
} |
49
|
17
|
|
|
|
|
51
|
$self->_add_tags(@tags_to_add); |
50
|
|
|
|
|
|
|
|
51
|
17
|
|
|
|
|
44
|
return; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub _start_handle_role |
55
|
|
|
|
|
|
|
{ |
56
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
0
|
return $self->_start_handle_non_role(); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub _is_expanded |
62
|
|
|
|
|
|
|
{ |
63
|
49
|
|
|
49
|
|
118
|
return 1; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub _is_expanded_for_treeview |
67
|
|
|
|
|
|
|
{ |
68
|
17
|
|
|
17
|
|
23
|
my $self = shift; |
69
|
|
|
|
|
|
|
|
70
|
17
|
|
|
|
|
31
|
my $node = $self->top->_node(); |
71
|
|
|
|
|
|
|
|
72
|
17
|
|
66
|
|
|
62
|
return ( $node->expanded() || $self->top->_accum_state->{'show_always'} ); |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
__END__ |