line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
95766
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
50
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings FATAL => 'all'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
95
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package HTML::Tested::JavaScript::ColorPicker; |
5
|
1
|
|
|
1
|
|
7
|
use base 'HTML::Tested::Value'; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
891
|
|
6
|
|
|
|
|
|
|
use HTML::Tested qw(HTV); |
7
|
|
|
|
|
|
|
use HTML::Tested::JavaScript qw($Location); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
|
|
|
|
|
|
my ($class, $parent, $name, @more) = @_; |
11
|
|
|
|
|
|
|
my $self = $class->SUPER::new($parent, $name, @more); |
12
|
|
|
|
|
|
|
$parent->ht_add_widget(HTV, "$name\_color_style", is_trusted => 1 |
13
|
|
|
|
|
|
|
, default_value => <
|
14
|
|
|
|
|
|
|
#$name\_color { |
15
|
|
|
|
|
|
|
-moz-user-select: none; |
16
|
|
|
|
|
|
|
position: relative; |
17
|
|
|
|
|
|
|
background-image: url($Location/images/color_picker.png); |
18
|
|
|
|
|
|
|
background-color: #FF0000; |
19
|
|
|
|
|
|
|
background-repeat: no-repeat; |
20
|
|
|
|
|
|
|
background-position: -6px -6px; |
21
|
|
|
|
|
|
|
height: 180px; |
22
|
|
|
|
|
|
|
width: 180px; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
#$name\_color_pointer { |
26
|
|
|
|
|
|
|
top: -5.5px; |
27
|
|
|
|
|
|
|
left: -5.5px; |
28
|
|
|
|
|
|
|
width: 11px; |
29
|
|
|
|
|
|
|
height: 11px; |
30
|
|
|
|
|
|
|
position: absolute; |
31
|
|
|
|
|
|
|
background-position: -6px -188px; |
32
|
|
|
|
|
|
|
background-image: url($Location/images/color_picker.png); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
ENDS |
35
|
|
|
|
|
|
|
$parent->ht_add_widget(HTV, "$name\_color", is_trusted => 1 |
36
|
|
|
|
|
|
|
, default_value => <
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
ENDS |
39
|
|
|
|
|
|
|
$parent->ht_add_widget(HTV, "$name\_hue_style", is_trusted => 1 |
40
|
|
|
|
|
|
|
, default_value => <
|
41
|
|
|
|
|
|
|
#$name\_hue { |
42
|
|
|
|
|
|
|
-moz-user-select: none; |
43
|
|
|
|
|
|
|
position: relative; |
44
|
|
|
|
|
|
|
background-image: url($Location/images/color_picker.png); |
45
|
|
|
|
|
|
|
width: 16px; |
46
|
|
|
|
|
|
|
height: 180px; |
47
|
|
|
|
|
|
|
background-position: -196px -6px; |
48
|
|
|
|
|
|
|
background-repeat: no-repeat; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
#$name\_hue_pointer { |
52
|
|
|
|
|
|
|
width: 27px; |
53
|
|
|
|
|
|
|
height: 9px; |
54
|
|
|
|
|
|
|
position: absolute; |
55
|
|
|
|
|
|
|
top: -4.5px; |
56
|
|
|
|
|
|
|
left: -5px; |
57
|
|
|
|
|
|
|
background-image: url($Location/images/color_picker.png); |
58
|
|
|
|
|
|
|
background-position: -22px -188px; |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
ENDS |
61
|
|
|
|
|
|
|
$parent->ht_add_widget(HTV, "$name\_hue", is_trusted => 1 |
62
|
|
|
|
|
|
|
, default_value => <
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
ENDS |
65
|
|
|
|
|
|
|
$parent->ht_add_widget(HTV, "$name\_rgb_$_", is_trusted => 1 |
66
|
|
|
|
|
|
|
, default_value => <
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
ENDS |
69
|
|
|
|
|
|
|
for qw(r g b); |
70
|
|
|
|
|
|
|
$parent->ht_add_widget(HTV, "$name\_color_sample_style", is_trusted => 1 |
71
|
|
|
|
|
|
|
, default_value => <
|
72
|
|
|
|
|
|
|
#$name\_current_color { |
73
|
|
|
|
|
|
|
width: 60px; |
74
|
|
|
|
|
|
|
height: 60px; |
75
|
|
|
|
|
|
|
border: 2px solid #999; |
76
|
|
|
|
|
|
|
position: relative; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
#$name\_prev_color { |
80
|
|
|
|
|
|
|
position: absolute; |
81
|
|
|
|
|
|
|
top: 50%; |
82
|
|
|
|
|
|
|
height: 50%; |
83
|
|
|
|
|
|
|
width: 100%; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
ENDS |
86
|
|
|
|
|
|
|
$parent->ht_add_widget(HTV, "$name\_color_sample", is_trusted => 1 |
87
|
|
|
|
|
|
|
, default_value => <
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
ENDS |
90
|
|
|
|
|
|
|
$parent->ht_add_widget(HTV, "$name\_rgb_hex", is_trusted => 1 |
91
|
|
|
|
|
|
|
, default_value => <
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
ENDS |
94
|
|
|
|
|
|
|
return $self; |
95
|
|
|
|
|
|
|
} |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
1; |