1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-06-01 13:32:40 +02:00

Updated 1.11 Data types (markdown)

koalyptus 2016-10-05 14:20:20 +11:00
parent 58d391f414
commit 310de63b8a

@ -17,7 +17,86 @@ Starting from v0.3.0, the following properties are no longer supported:
</thead>
<tbody>
<tr>
<th>default_date_type <sup>Obsolete</sup></th>
<th>locale</th>
<td>string</td>
<td>defines global locale (default - 'en')</td>
<td>
<p>Locales are now provided by the Sugar Date module, for more information refer to <a href="https://sugarjs.com/docs/#/DateLocales">related documentation</a>.
</td>
<td><code>var tfConfig = { locale: 'en-GB'}</code></td>
</tr>
<tr>
<th>thousands_separator</th>
<td>string</td>
<td>defines default thousands separator, 2 possible values: '.'
or ',' (default - ',')</td>
<td></td>
<td><code> var tfConfig = { thousands_separator: "." }</code></td>
</tr>
<tr>
<th>decimal_separator</th>
<td>string</td>
<td>defines default decimal separator, 2 possible values: ','
or '.' (default - '.')</td>
<td></td>
<td> <code>var tfConfig = { decimal_separator: "," }</code></td>
</tr>
<tr>
<th>col_types</th>
<td>array</td>
<td>this array defines the data type on a column basis:
<ul>
<li><code>string</code> (default column type if none specified)</li>
<li><code>number</code> (unformatted number)</li>
<li>
<code>formatted-number</code> (defaults to '.' decimal separator and ',' thousands separator) or <br>
or an object <code>{ type: 'formatted-number', decimal: ',', thousands: '.' }</code> for customisation
</li>
<li>
<code>date</code> defaulting to <code>en</code> locale or <br>
or an object <code>{ type: 'date', locale: 'en-GB', format: ['{dd}-{months}-{yyyy|yy}'] }</code> for
customisation
</li>
<li><code>ipaddress</code> (specific to column sorting)</li>
<li><code>caseinsensitivestring</code> (specific to column sorting)</li>
<li><code>none</code> (specific to column sorting)</li>
</ul>
</td>
<td></td>
<td>
<pre>
var tfConfig = {
col_types: [
'string',
'number',
'formatted-number', // defaults to '.' for decimal and ',' for thousands
{ type: 'formatted-number', decimal: ',', thousands: '.' },
'date',
{ type: 'date', locale: 'fr' },
{ type: 'date', locale: 'en', format: ['{dd}-{months}-{yyyy|yy}'] },
'ipaddress'
]
};
</pre>
</td>
</tr>
</tbody>
</table>
<h2>Obsolete:</h2>
<table>
<thead>
<tr>
<th>Property</th>
<th>Type</th>
<th>Description</th>
<th>Remarks</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<th>default_date_type</th>
<td>string</td>
<td>defines default date type. It accepts the following values: 'DMY',
'MDY', 'YMD', 'DDMMMYYYY' (default - 'DMY')</td>
@ -32,22 +111,6 @@ Starting from v0.3.0, the following properties are no longer supported:
</ul></td>
<td><code>var tfConfig = { default_date_type: 'MDY'}</code></td>
</tr>
<tr>
<th>thousands_separator</th>
<td>string</td>
<td>defines default thousands separator, 2 possible values: '.'
(EU) or ',' (US) (default - ',')</td>
<td></td>
<td><code> var tfConfig = { thousands_separator: "." }</code></td>
</tr>
<tr>
<th>decimal_separator</th>
<td>string</td>
<td>defines default decimal separator, 2 possible values: ',' (EU)
or '.' (US) (default - '.')</td>
<td></td>
<td> <code>var tfConfig = { decimal_separator: "," }</code></td>
</tr>
<tr>
<th>col_number_format</th>
<td>array</td>