line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Widgets::NavMenu::Iterator::JQTreeView; |
2
|
|
|
|
|
|
|
$HTML::Widgets::NavMenu::Iterator::JQTreeView::VERSION = '1.1000'; |
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use HTML::Widgets::NavMenu::EscapeHtml qw/ escape_html /; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use parent qw(HTML::Widgets::NavMenu::Iterator::NavMenu); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub _init |
11
|
|
|
|
|
|
|
{ |
12
|
21
|
|
|
21
|
|
28
|
my $self = shift; |
13
|
21
|
|
|
|
|
25
|
my $args = shift; |
14
|
|
|
|
|
|
|
|
15
|
21
|
|
|
|
|
60
|
$self->SUPER::_init($args); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
# Make a fresh copy just to be on the safe side. |
18
|
21
|
|
|
|
|
28
|
$self->_ul_classes( [ @{ $args->{'ul_classes'} } ] ); |
|
21
|
|
|
|
|
49
|
|
19
|
|
|
|
|
|
|
|
20
|
21
|
|
|
|
|
38
|
return 0; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub _calc_open_li_tag |
25
|
|
|
|
|
|
|
{ |
26
|
17
|
|
|
17
|
|
21
|
my $self = shift; |
27
|
|
|
|
|
|
|
|
28
|
17
|
|
|
|
|
37
|
my $id_attr = $self->_calc_li_id_attr(); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
return ( |
31
|
17
|
100
|
|
|
|
32
|
$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
|
|
|
|
|
31
|
my $top_item = $self->top; |
44
|
17
|
|
|
|
|
41
|
my @tags_to_add = ( $self->_calc_open_li_tag(), $self->get_link_tag() ); |
45
|
17
|
100
|
66
|
|
|
38
|
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
|
|
|
|
|
46
|
$self->_add_tags(@tags_to_add); |
50
|
|
|
|
|
|
|
|
51
|
17
|
|
|
|
|
43
|
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
|
|
115
|
return 1; |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub _is_expanded_for_treeview |
67
|
|
|
|
|
|
|
{ |
68
|
17
|
|
|
17
|
|
25
|
my $self = shift; |
69
|
|
|
|
|
|
|
|
70
|
17
|
|
|
|
|
26
|
my $node = $self->top->_node(); |
71
|
|
|
|
|
|
|
|
72
|
17
|
|
66
|
|
|
60
|
return ( $node->expanded() || $self->top->_accum_state->{'show_always'} ); |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
1; |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
__END__ |