line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormWidgets::ScrollingList; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
880
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
47
|
|
4
|
1
|
|
|
1
|
|
13
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
5
|
1
|
|
|
1
|
|
6
|
use parent 'HTML::FormWidgets'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( qw( height labels values ) ); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init { |
10
|
1
|
|
|
1
|
1
|
3
|
my ($self, $args) = @_; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
7
|
$self->class ( q(ifield) ); |
13
|
1
|
|
|
|
|
7
|
$self->height( 10 ); |
14
|
1
|
|
|
|
|
7
|
$self->labels( undef ); |
15
|
1
|
|
|
|
|
85
|
$self->values( [] ); |
16
|
1
|
|
|
|
|
7
|
return; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub render_field { |
20
|
1
|
|
|
1
|
1
|
3
|
my ($self, $args) = @_; |
21
|
|
|
|
|
|
|
|
22
|
1
|
50
|
|
|
|
3
|
$self->class =~ m{ chzn-select }msx |
23
|
|
|
|
|
|
|
and $self->add_optional_js( q(chosen.js) ); |
24
|
|
|
|
|
|
|
|
25
|
1
|
50
|
|
|
|
12
|
$args->{class } .= ($args->{class} ? q( ) : q()).$self->class; |
26
|
1
|
50
|
|
|
|
7
|
$args->{labels } = $self->labels if ($self->labels); |
27
|
1
|
50
|
|
|
|
10
|
$args->{onchange} = $self->onchange if ($self->onchange); |
28
|
1
|
|
|
|
|
8
|
$args->{size } = $self->height; |
29
|
1
|
|
|
|
|
7
|
$args->{values } = $self->values; |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
|
|
6
|
return $self->hacc->scrolling_list( $args ); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|