NAME
Mojolicious::Plugin::DevexpressHelpers::Helpers - Helpers for Devexpress controls are defined here
VERSION
version 0.151410
SUBROUTINES/METHODS
out
Output string in template
out '<div id="'.$id.'"></div>';
new
Internal usage.
my $dxHelper = Mojolicous::Plugin::DevexpressHelpers::Helpers->new;
$c->stash( dxHelper => $dxHelper );
add_binding
Internal usage.
$dxHelper->add_binding($binding, [$binding2,...] );
next_id
Internal usage.
my $next_id_number = $dxHelper->next_id;
new_id
Internal usage.
my $new_id = $dxHelper->new_id;
dxbind
Internal usage.
dxbind( $c, 'dxButton' => $id => $attrs, \@extensions);
Produce a div tag with an computed id, which will be binded to a dxButton with $attrs
attributs at call to dxbuild
parse_attributs
Internal usage
my $attrs = parse_attributs( $c, \@implicit_arguments, @attributs )
dxbutton [ $id, [ $text, [ $onclick ] ] ], [ \%options ]
%= dxbutton myButtonId => 'My button' => q{ function (){ alert('onClick!'); } }
%= dxbutton undef, 'My button' => '/some/url'
%= dxbutton {
id => myId,
text => 'My button',
onClick => q{ function (){ alert('onClick!'); } },
type => 'danger',
icon => 'user'
};
dxdatagrid [ $id, [ $datasource, ] ] [ \%opts ]
%= dxdatagrid 'myID' => '/products.json', { columns => [qw( name description price )] }
%= dxdatagrid undef, '/products.json'
%= dxdatagrid { id => myId, dataSource => '/products.json' }
dxpopup [ $id, [ $title, [ $contentTemplate, ] ] ], [\%opts]
%= dxpopup myPopupID => 'Popup Title', \q{function(contentElement){
contentElement.append('<p>Hello!</p>');
}};
dxbuild
Build the binding between jQuery and divs generated by plugin helpers such as dxbutton. It is should to be called in your template just before you close the body tag.
<body>
...
%= dxbuild
</body>
require_asset @assets
Used to specify one or more assets dependencies, that will be appended on call to required_assets. This function need 'AssetPack' plugin to be configurated in your application.
in your template:
<body>
...
%= require_asset 'MyScript.js'
...
</body>
in your layout:
<head>
...
%= required_assets
...
</head>
required_assets
Add assets that was specified by calls to require_asset. See require_asset for usage.
AUTHOR
Nicolas Georges <xlat@cpan.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2015 by Nicolas Georges.
This is free software, licensed under:
The MIT (X11) License