line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package JQuery::Form ; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = '1.00'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1666
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
38
|
|
6
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
403
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub new { |
10
|
0
|
|
|
0
|
1
|
|
my $this = shift; |
11
|
0
|
|
0
|
|
|
|
my $class = ref($this) || $this; |
12
|
0
|
|
|
|
|
|
my $my ; |
13
|
0
|
|
|
|
|
|
%{$my->{param}} = @_ ; |
|
0
|
|
|
|
|
|
|
14
|
0
|
0
|
|
|
|
|
die "No id defined for Form" unless $my->{param}{id} =~ /\S/ ; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
bless $my, $class; |
17
|
|
|
|
|
|
|
|
18
|
0
|
0
|
|
|
|
|
if ($my->{param}{css}) { |
19
|
0
|
|
|
|
|
|
push @{$my->{css}},$my->{param}{css} ; |
|
0
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
$my->add_to_jquery ; |
23
|
0
|
|
|
|
|
|
return $my ; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub add_to_jquery { |
27
|
0
|
|
|
0
|
0
|
|
my $my = shift ; |
28
|
0
|
|
|
|
|
|
my $jquery = $my->{param}{addToJQuery} ; |
29
|
0
|
0
|
|
|
|
|
if (defined $jquery) { |
30
|
0
|
|
|
|
|
|
$jquery->add($my) ; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub id { |
35
|
0
|
|
|
0
|
0
|
|
my $my = shift ; |
36
|
0
|
|
|
|
|
|
return $my->{param}{id} ; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub packages_needed { |
41
|
0
|
|
|
0
|
0
|
|
my $my = shift ; |
42
|
0
|
|
|
|
|
|
return ('taconite/jquery.taconite.js','form/jquery.form.js') ; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub get_jquery_code { |
47
|
0
|
|
|
0
|
0
|
|
my $my = shift ; |
48
|
0
|
|
|
|
|
|
my $id = $my->id ; |
49
|
0
|
|
|
|
|
|
my $remoteProgram = $my->{param}{remoteProgram} ; |
50
|
|
|
|
|
|
|
|
51
|
0
|
|
|
|
|
|
my $function =<<'EOD'; |
52
|
|
|
|
|
|
|
$('#ID').ajaxForm(function() { |
53
|
|
|
|
|
|
|
}); |
54
|
|
|
|
|
|
|
EOD |
55
|
0
|
|
|
|
|
|
$function =~ s/ID/$id/ ; |
56
|
0
|
|
|
|
|
|
return $function ; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
1; |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
__END__ |