'Method to extract the configuration data from S3 globals and
store them as an attr variable.
- used by Survey module
@return: dictionary of attributes which can be passed into html()
@param attr: dictionary of attributes which can be passed in
dt_pageLength : The default number of records that will be shown
dt_pagination: Enable pagination
dt_pagingType: type of pagination, one of:
simple
simple_numbers
full
full_numbers (default)
http://datatables.net/reference/option/pagingType
dt_searching: Enable or disable filtering of data.
dt_group: The colum that is used to group the data
dt_ajax_url: The URL to be used for the Ajax call
dt_action_col: The column where the action buttons will be placed
dt_bulk_actions: list of labels for the bulk actions.
dt_bulk_col: The column in which the checkboxes will appear,
by default it will be the column immediately
before the first data item
dt_bulk_selected: A list of selected items
dt_actions: dictionary of actions
dt_styles: dictionary of styles to be applied to a list of ids
for example:
{"warning" : [1,3,6,7,9],
"alert" : [2,10,13]}'

@staticmethod
def getConfigData():

    s3 = current.response.s3
    attr = Storage()
    if s3.datatable_ajax_source:
        attr.dt_ajax_url = s3.datatable_ajax_source
    if s3.actions:
        attr.dt_actions = s3.actions
    if s3.dataTableBulkActions:
        attr.dt_bulk_actions = s3.dataTableBulkActions
    if s3.dataTable_pageLength:
        attr.dt_pageLength = s3.dataTable_pageLength
    attr.dt_pagination = ('false' if s3.no_sspag else 'true')
    if s3.dataTable_group:
        attr.dt_group = s3.dataTable_group
    if s3.dataTable_dom:
        attr.dt_dom = s3.dataTable_dom
    if s3.dataTableDisplay:
        attr.dt_display = s3.dataTableDisplay
    if (s3.dataTableStyleDisabled or s3.dataTableStyleWarning or s3.dataTableStyleAlert):
        attr.dt_styles = {}
        if s3.dataTableStyleDisabled:
            attr.dt_styles['dtdisable'] = s3.dataTableStyleDisabled
        if s3.dataTableStyleWarning:
            attr.dt_styles['dtwarning'] = s3.dataTableStyleWarning
        if s3.dataTableStyleAlert:
            attr.dt_styles['dtalert'] = s3.dataTableStyleAlert
    return attr
