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