Alien-GvaScript

 view release on metacpan or  search on metacpan

lib/Alien/GvaScript/Grid.pod  view on Meta::CPAN


=item label I<(string)>

column label. can be an empty string

mandatory.

=item value I<(string|Function)>

string representing the key of the json element that the column is bound to.

Function that takes the records as an argument and returns string value of the column.
Ex: C<value: function(e) {return e.fname + ' ' + e.lname}>

mandatory.

=item default_value I<(string)>

string value representing the column's default value if no value was found in the JSON datasource.

optional.

=item css I<(string|Array)>

a single css class or and array of css classes to be given to the column header/cells.

optional.

=back 

=item actions I<(Array)>

Array that defines the grids list of actions (to be rendered in the grid's tool bar).

Action object here is identical to GvaScript.CustomButtons.Button.options

=item grabfocus I<(boolean)>

boolean indicating whether the grid container is to grab focus right after the grid has been initialized.

optional - defaulted to C<true>

=item pagesize I<(numeric|'auto')>

a numeric specifying number of records to show on a page. To keep this number variable and dependant on grid's container available space, set it to 'auto'.

optional - defaulted to C<'auto'>

=item gridheight I<(numeric|'auto')>

height to set to the grid. To keep this number variable and dependant on the grid's container available space, set it to 'auto'.

optional - defaulted to C<'auto'>

=item recordheight I<(numeric)>

height to set to the grid record.

optional - defaulted to C<21>

=item requestTimeout I<(numeric)>

time in seconds to wait before aborting the AJAX request.

optional - defaulted to 15

=item errorMsg I<(string)>

message to display in the grid container area when the request times out.

optional - defaulted to "Problème de connexion. Réessayer et si le problème persiste, contacter un administrateur.".

=back

=head1 PROPERTIES

Here's a list of useful properties of the Grid Object.

=head2 grid_container

  grid.grid_container

C<HTMLElement> container of the grid list 

=head2 toolbar_container

  grid.toolbar_container

C<HTMLElement> container of the toolbar (pagination links + action buttons)

=head2 paginatorbar_container

  grid.paginatorbar_container 

C<HTMLElement> container of the pagination links

=head2 actionsbar_container

 grid.actionsbar_container 

C<HTMLElement> container of the action buttons

=head1 METHODS

=head2 clearResult

  grid.clearResult(msg)

This method clears the grid result container and displays C<msg> instead.

=head2 clearToolbar

  grid.clearToolbar()

This methods clears the grid toolbar container.

=head2 clearActionButtons

  grid.clearActionButtons()

This method clears the action buttons container and thus removes the buttons

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.534 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )