Changes between Version 40 and Version 41 of S3/FilterForms


Ignore:
Timestamp:
04/02/13 09:37:01 (12 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3/FilterForms

    v40 v41  
    3030For the configuration, a widget instance is created like:
    3131
    32 {{{
     32{{{#!python
    3333instance = S3FilterWidget(field=None, **attr)
    3434}}}
     
    3939The widget is then rendered by calling it:
    4040
    41 {{{
     41{{{#!python
    4242widget = instance(resource, get_vars=None, alias=None)
    4343}}}
     
    5656Configuration:
    5757
    58 {{{
     58{{{#!python
    5959instance = S3TextFilter(field, _class="class", _size=40, _name="name", comment=None)
    6060}}}
     
    8585Configuration:
    8686
    87 {{{
     87{{{#!python
    8888instance = S3OptionsFilter(field, _class="class", _name="name", options=None, represent=None, widget=None, comment=None)
    8989}}}
     
    116116Configuration:
    117117
    118 {{{
     118{{{#!python
    119119instance = S3DateFilter(field, _class="class", hide_time=False, comment=None)
    120120}}}
     
    143143The filter form can be suppressed by a keyword argument to {{{s3_rest_controller()}}}:
    144144
    145 {{{
     145{{{#!python
    146146output = s3_rest_controller(prefix, resourcename,
    147147                            hide_filter=True        # hide filter form in list views
     
    158158For pages with filter forms, the filter widgets are configured per resource as a list of filter widget instances in the "filter_widgets"-setting like:
    159159
    160 {{{
     160{{{#!python
    161161s3db.configure(tablename,
    162162               filter_widgets=[
     
    181181Additionally, there are a number of controller options for the s3_rest_controller call:
    182182
    183 {{{
     183{{{#!python
    184184output = s3_rest_controller(prefix, resourcename,
    185185                            filter_submit_url = submit_url,
     
    190190}}}
    191191
    192 ||'''Option'''||'''Type'''||'''Function'''||'''Default'''||
    193 ||filter_submit_url||URL string||where to request filtered data from||URL of the current call||
    194 ||filter_ajax_url||URL string||where to request updated filter options from||URL of the current call with /filter method||
    195 ||filter_formstyle||Formstyle function||Alternative formstyle for the filter form||built-in formstyle||
    196 ||filter_submit||String||Label for the submit button or tupel of (label, class) to also specify a CSS class for the button||T("Search")||
     192'''Options''':
     193
     194  ||'''Option'''||'''Type'''||'''Function'''||'''Default'''||
     195  ||filter_submit_url||URL string||where to request filtered data from||URL of the current call||
     196  ||filter_ajax_url||URL string||where to request updated filter options from||URL of the current call with /filter method||
     197  ||filter_formstyle||Formstyle function||Alternative formstyle for the filter form||built-in formstyle||
     198  ||filter_submit||String||Label for the submit button or tupel of (label, class) to also specify a CSS class for the button||T("Search")||
     199
    197200== Development ==
    198201