line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
139607
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
35
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
213
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package HTML::Tested::JavaScript::RichEdit; |
5
|
1
|
|
|
1
|
|
6
|
use base 'HTML::Tested::Value'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2467
|
|
6
|
|
|
|
|
|
|
use HTML::Tested::JavaScript; |
7
|
|
|
|
|
|
|
use HTML::Tested::Value::DropDown; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
|
|
|
|
|
|
my ($class, $parent, $name, @more) = @_; |
11
|
|
|
|
|
|
|
my $self = $class->SUPER::new($parent, $name, @more); |
12
|
|
|
|
|
|
|
my @fonts = map { [ $_, $_ ] } ('Arial', 'Courier', 'Times New Roman' |
13
|
|
|
|
|
|
|
, 'Courier New', 'Georgia', 'Trebuchet MS', 'Verdana', 'Serif'); |
14
|
|
|
|
|
|
|
$parent->ht_add_widget('HTML::Tested::Value::DropDown' |
15
|
|
|
|
|
|
|
, "$name\_fontname" |
16
|
|
|
|
|
|
|
, default_value => [ [ "", "Font" ], @fonts ]); |
17
|
|
|
|
|
|
|
$parent->ht_add_widget('HTML::Tested::Value::DropDown' |
18
|
|
|
|
|
|
|
, "$name\_fontsize", default_value => [ [ "", "Size" ] |
19
|
|
|
|
|
|
|
, map { [ $_, $_ ] } (1 .. 7) ]); |
20
|
|
|
|
|
|
|
return $self; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $_src_data = 'data:application/xhtml+xml,' . __PACKAGE__->encode_value( |
24
|
|
|
|
|
|
|
''); |
25
|
|
|
|
|
|
|
sub render { |
26
|
|
|
|
|
|
|
my ($self, $caller, $stash, $id) = @_; |
27
|
|
|
|
|
|
|
my $n = $self->name; |
28
|
|
|
|
|
|
|
$stash->{$n} = ""; |
29
|
|
|
|
|
|
|
my $scr = '\n"; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$scr .= "\n" |
33
|
|
|
|
|
|
|
unless $caller->ht_get_widget_option($n, "no_onload"); |
34
|
|
|
|
|
|
|
$stash->{$n . "_script"} = $scr; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |