1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-12 11:27:24 +02:00

Started filters visibility doc

This commit is contained in:
Max Guglielmi 2015-06-26 18:11:16 +10:00
parent f5ec98c22a
commit 1db14d73da

171
README.md
View file

@ -88,4 +88,175 @@ Find the complete documentation in the [WIKI](https://github.com/koalyptus/Table
[MIT](LICENSE.md)
<table>
<thead>
<tr>
<th>Property</th>
<th>Type</th>
<th>Description</th>
<th>Remarks</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<th>target_id</th>
<td>string</td>
<td>defines the id of the container element that will contain the link/button showing / hiding filters row (default - null)</td>
<td></td>
<td>
<code>var tfConfig = {
extensions: [{
name: 'filtersVisibility'
target_id: 'my_container_id'
}]
};</code>
</td>
</tr>
<tr>
<th>enable_icon</th>
<td>boolean</td>
<td>enable/disable default icon placed just before the link (default - true)</td>
<td></td>
<td>
<code>var tfConfig = {
extensions: [{
name: 'filtersVisibility'
target_id: 'my_container_id',
enable_icon: false
}]
};</code>
</td>
</tr>
<tr>
<th>btn_text</th>
<td>string</td>
<td>sets the text of the link showing / hiding filters row (default - '')</td>
<td></td>
<td>
<code>var tfConfig = {
extensions: [{
name: 'filtersVisibility'
target_id: 'my_container_id',
enable_icon: false,
btn_text: 'Filters'
}]
};</code>
</td>
</tr>
<tr>
<th>btn_filters_row_visibility_html</th>
<td>string</td>
<td>defines the HTML of the button showing / hiding filters row (default
* null) </td>
<td>note that the
<code>onclick</code> event is added automatically
to the html element and overwrites any eventual
<code>onclick</code>
attribute
</td>
<td>
<code>var tfConfig = { btn_filters_row_visibility_html: '&lt;button
class="myCssClass"&gt;Expand/collapse filters&lt;/button&gt;'
}</code>
</td>
</tr>
<tr>
<th>btn_filters_row_visibility_css_class</th>
<td>string</td>
<td>defines the css class of the link showing / hiding filters row&nbsp;(default
* 'btnExpClpFlt')</td>
<td></td>
<td>
<code>var tfConfig = { btn_filters_row_visibility_css_class: 'myClass'
}</code>
</td>
</tr>
<tr>
<th>filters_row_visibility_css_class</th>
<td>string</td>
<td>defines the css class of the container (default - 'expClpFlt')</td>
<td></td>
<td>
<code>var tfConfig = { filters_row_visibility_css_class: 'myClass'
}</code>
</td>
</tr>
<tr>
<th>filters_row_visibility_filters_table</th>
<td>string</td>
<td>If filters are in a separated table, this is the id of the filters
table (default - null)</td>
<td></td>
<td>
<code>var tfConfig = { filters_row_visibility_filters_table: 'myTableId'
}</code>
</td>
</tr>
<tr>
<th>filters_row_visibility_filters_index</th>
<td>number</td>
<td>Only with external filters, this tells the scripts which row contains
the filters (default - 1)</td>
<td></td>
<td>
<code>var tfConfig = { filters_row_visibility_filters_index: 1 }</code>
</td>
</tr>
<tr>
<th>filters_row_visibility_at_start</th>
<td>boolean</td>
<td>if set false it will hide the filters row at extension first load</td>
<td></td>
<td>
<code>var tfConfig = { filters_row_visibility_at_start: false }</code>
</td>
</tr>
<tr>
<th>on_before_filters_row_is_displayed</th>
<td>function</td>
<td>calls defined function before filters row is displayed</td>
<td></td>
<td>
<code>var tfConfig = { on_before_filters_row_is_displayed: function(o){
alert(o.id); }</code>
</td>
</tr>
<tr>
<th>on_after_filters_row_is_displayed</th>
<td>function</td>
<td>calls defined function after filters row is displayed</td>
<td></td>
<td>
<code>var tfConfig = { on_after_filters_row_is_displayed: function(o){
alert(o.id); }</code>
</td>
</tr>
<tr>
<th>on_before_filters_row_is_hidden</th>
<td>function</td>
<td>calls defined function before filters row is hidden</td>
<td></td>
<td>
<code>var tfConfig = { on_before_filters_row_is_hidden: function(o){
alert(o.id); }</code>
</td>
</tr>
<tr>
<th>on_after_filters_row_is_hidden</th>
<td>function</td>
<td>calls defined function after filters row is hidden</td>
<td></td>
<td>
<code>var tfConfig = { on_after_filters_row_is_hidden: function(o){
alert(o.id); }</code>
</td>
</tr>
</tbody>
</table>