yesod-datatables-0.1: Yesod plugin for DataTables (jQuery grid plugin)

Safe HaskellNone

Yesod.DataTables.Request

Description

DataTables request parsing.

Synopsis

Documentation

data Request Source

DataTables grid server-side request (see http:datatables.netusageserver-side)

Constructors

Request 

Fields

reqDisplayStart :: Int

Display start point in the current data set.

reqDisplayLength :: Int

Number of records that the table can display in the current draw. It is expected that the number of records returned will be equal to this number, unless the server has fewer records to return.

reqSearch :: Text

Global search field

reqSearchRegex :: Bool

True if the global filter should be treated as a regular expression for advanced filtering, false if not.

reqColumns :: [Column]

columns that the client-side knows about

reqSort :: [(ColumnName, SortDir)]

result set sorting instructions

reqEcho :: Int

Information for DataTables to use for rendering (do not alter).

Instances

data Column Source

information about grid column

Constructors

Column 

Fields

colSearchable :: Bool

whether searching is enabled at client-side

colSearch :: Text

column-specific search query

colSearchRegex :: Bool

whether search query should be interpreted as a regular expression

colSortable :: Bool

whether sorting is enabled at client-side

colName :: Text

column name (client-side also expects the data in a field with the same name

Instances

type ColumnName = TextSource

Name of DataTables grid column

data SortDir Source

enum for sSortDir_(int)

Constructors

SortAsc 
SortDesc 

Instances

parseRequest :: [(ParamName, ParamValue)] -> Maybe RequestSource

Tries to parse DataTables request