line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::DevexpressHelpers; |
2
|
|
|
|
|
|
|
$Mojolicious::Plugin::DevexpressHelpers::VERSION = '0.163572'; |
3
|
|
|
|
|
|
|
#ABSTRACT: Add some helpers to add and configure Devexpress controls |
4
|
7
|
|
|
7
|
|
19701
|
use Modern::Perl; |
|
7
|
|
|
|
|
18406
|
|
|
7
|
|
|
|
|
36
|
|
5
|
7
|
|
|
7
|
|
1263
|
use Mojo::Base 'Mojolicious::Plugin'; |
|
7
|
|
|
|
|
1876
|
|
|
7
|
|
|
|
|
47
|
|
6
|
7
|
|
|
7
|
|
4350
|
use Mojolicious::Plugin::DevexpressHelpers::Helpers; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
224
|
|
7
|
7
|
|
|
7
|
|
35
|
use MojoX::AlmostJSON; |
|
7
|
|
|
|
|
10
|
|
|
7
|
|
|
|
|
1124
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub register { |
13
|
6
|
|
|
6
|
1
|
287
|
my ( $self, $app, $args ) = @_; |
14
|
|
|
|
|
|
|
|
15
|
6
|
|
50
|
|
|
44
|
$args->{'tag_camelcase'} //= 1; |
16
|
6
|
|
50
|
|
|
36
|
$args->{'tag_prefix'} //= 'dx'; |
17
|
6
|
|
|
|
|
21
|
Mojolicious::Plugin::DevexpressHelpers::Helpers->register( $app, $args ); |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#make json boolean easier to write within templates |
20
|
6
|
|
|
|
|
96
|
$app->helper( 'true' => \&MojoX::AlmostJSON::true ); |
21
|
6
|
|
|
|
|
77
|
$app->helper( 'false' => \&MojoX::AlmostJSON::false ); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
$app->hook( |
24
|
|
|
|
|
|
|
before_dispatch => sub { |
25
|
12
|
|
|
12
|
|
125511
|
my $c = shift; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
#create a new object that will help to generate binding for dx controls |
28
|
12
|
|
|
|
|
145
|
$c->stash( 'dxHelper' => |
29
|
|
|
|
|
|
|
Mojolicious::Plugin::DevexpressHelpers::Helpers->new ); |
30
|
|
|
|
|
|
|
} |
31
|
6
|
|
|
|
|
100
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
1; # End of Mojolicious::Plugin::DevexpressHelpers |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
__END__ |