line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojolicious::Plugin::DevexpressHelpers; |
2
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
3
|
|
|
|
|
|
|
|
4
|
3
|
|
|
3
|
|
16237
|
use Modern::Perl; |
|
3
|
|
|
|
|
10780
|
|
|
3
|
|
|
|
|
14
|
|
5
|
3
|
|
|
3
|
|
761
|
use Mojo::Base 'Mojolicious::Plugin'; |
|
3
|
|
|
|
|
1409
|
|
|
3
|
|
|
|
|
18
|
|
6
|
3
|
|
|
3
|
|
1877
|
use Mojolicious::Plugin::DevexpressHelpers::Helpers; |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
77
|
|
7
|
3
|
|
|
3
|
|
14
|
use MojoX::AlmostJSON; |
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
467
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub register { |
13
|
2
|
|
|
2
|
1
|
85
|
my ($self, $app, $args) = @_; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#TODO: add assetpack |
16
|
|
|
|
|
|
|
#plugin "AssetPack"; |
17
|
|
|
|
|
|
|
#app->asset( ... ); |
18
|
|
|
|
|
|
|
|
19
|
2
|
|
50
|
|
|
23
|
my $tp = $args->{'tag_prefix'} // 'dx'; |
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
|
|
16
|
$app->helper( 'dxbuild' => \&Mojolicious::Plugin::DevexpressHelpers::Helpers::dxbuild ); |
22
|
2
|
|
|
|
|
69
|
$app->helper( $tp.'button' => \&Mojolicious::Plugin::DevexpressHelpers::Helpers::dxbutton ); |
23
|
2
|
|
|
|
|
44
|
$app->helper( $tp.'datagrid' => \&Mojolicious::Plugin::DevexpressHelpers::Helpers::dxdatagrid ); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
#make json boolean easier to write within templates |
26
|
2
|
|
|
|
|
24
|
$app->helper( 'true' => \&MojoX::AlmostJSON::true ); |
27
|
2
|
|
|
|
|
24
|
$app->helper( 'false' => \&MojoX::AlmostJSON::false ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
$app->hook(before_dispatch => sub{ |
30
|
3
|
|
|
3
|
|
22057
|
my $c = shift; |
31
|
|
|
|
|
|
|
#create a new object that will help to generate binding for dx controls |
32
|
3
|
|
|
|
|
29
|
$c->stash('dxHelper' => Mojolicious::Plugin::DevexpressHelpers::Helpers->new ); |
33
|
2
|
|
|
|
|
31
|
}); |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; # End of Mojolicious::Plugin::DevexpressHelpers |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__END__ |