NAME

Mojolicious::Plugin::DevexpressHelpers::Helpers - Helpers for Devexpress controls are defined here

VERSION

version 0.151550_000

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 )

dxmenu $id, \@items ,[ \%options ]

%= dxmenu mainMenu => [{ id => 1, text => 'Back', iconSrc => '/images/back.png', link => 'javascript:location.back();' }], \q% function(e){return e.itemData.link;} %

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' }

The following syntaxe allow to specify all options from a javascript object. Note: It will ignore all other options specified in the hash reference.

%= dxdatagrid myId, { options => 'JSFrameWork.gridsOptions.myResource' }

dxpopup [ $id, [ $title, [ $contentTemplate, ] ] ], [\%opts]

%= dxpopup myPopupID => 'Popup Title', \q{function(contentElement){
		contentElement.append('<p>Hello!</p>');
	}};

dxswitch [ $id [, $value [, $label] ] ], [\%opts]

%= dxswitch 'mySwitch' => $boolean_value => 'Enabled: '

dxtextbox [ $id, [ $value, [ $label, ] ] ], [\%opts]

%= dxtextbox 'name' => $value => 'Name: ', { placeHolder => 'Type a name' }

dxlookup [ $id, [ $value, [ $label, ] ] ], [\%opts]

%= dxlookup 'name' => $value => 'Name: ', { dataSource => $ds, valueExpr=> $ve, displayExpr => $de }

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.

register

Register our helpers

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