mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-06-04 15:03:01 +02:00
Generated by grunt gh-pages
This commit is contained in:
parent
db99e91de5
commit
af29475517
|
@ -13216,6 +13216,11 @@ ezEditTable</a>
|
|||
status_bar: true,
|
||||
col_1: 'select',
|
||||
col_2: 'select',
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
col_widths: [
|
||||
'150px', '90px', '70px',
|
||||
'120px', '120px', '100px',
|
||||
|
@ -13283,12 +13288,7 @@ ezEditTable</a>
|
|||
}
|
||||
}
|
||||
}, {
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
@ -13213,10 +13213,15 @@ ezEditTable</a>
|
|||
status_bar: true,
|
||||
col_1: 'select',
|
||||
col_2: 'select',
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
col_widths: [
|
||||
"150px", "70px", "70px",
|
||||
"120px", "120px", "100px",
|
||||
"100px", "100px", "100px"
|
||||
'150px', '70px', '70px',
|
||||
'120px', '120px', '100px',
|
||||
'100px', '100px', '100px'
|
||||
],
|
||||
extensions: [
|
||||
{
|
||||
|
@ -13240,12 +13245,7 @@ ezEditTable</a>
|
|||
alert('Chosen record: ' + country);
|
||||
}
|
||||
}, {
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
@ -1942,7 +1942,10 @@
|
|||
paging_length: 10,
|
||||
rows_counter: true,
|
||||
rows_counter_text: 'Countries: ',
|
||||
|
||||
col_types: [
|
||||
'string', 'string', 'string',
|
||||
'string', 'number'
|
||||
],
|
||||
col_widths: [
|
||||
'75px','350px','350px',
|
||||
'75px','75px'
|
||||
|
@ -1955,8 +1958,7 @@
|
|||
|
||||
// sorting feature
|
||||
extensions: [{
|
||||
name: 'sort',
|
||||
types: ['string', 'string', 'string', 'string', 'number']
|
||||
name: 'sort'
|
||||
}]
|
||||
}
|
||||
);
|
||||
|
|
|
@ -1101,22 +1101,21 @@
|
|||
rows_counter_text: 'Items: ',
|
||||
btn_reset: true,
|
||||
status_bar: true,
|
||||
|
||||
col_types: [
|
||||
'none', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number'
|
||||
],
|
||||
sort_select: true,
|
||||
col_1: 'select',
|
||||
|
||||
// extensions: sort and column operations
|
||||
extensions: [
|
||||
{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'none', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}, {
|
||||
name: 'colOps',
|
||||
id: [
|
||||
|
|
|
@ -2806,6 +2806,10 @@
|
|||
status_bar: true,
|
||||
col_1: 'select',
|
||||
col_2: 'select',
|
||||
col_types: [
|
||||
'number', 'string', 'string',
|
||||
'formatted-number', 'formatted-number', 'string'
|
||||
],
|
||||
|
||||
/* columns visibility and sort extension */
|
||||
extensions: [{
|
||||
|
@ -2814,11 +2818,7 @@
|
|||
text: 'Columns: ',
|
||||
enable_tick_all: true
|
||||
}, {
|
||||
name: 'sort',
|
||||
types: [
|
||||
'number', 'string', 'string',
|
||||
'US', 'none', 'string'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter('demo', tfConfig);
|
||||
|
|
|
@ -13159,13 +13159,13 @@
|
|||
col_0: 'select',
|
||||
col_1: 'select',
|
||||
col_2: 'select',
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter(document.querySelector('#demo'), tfConfig);
|
||||
|
|
|
@ -13167,6 +13167,11 @@
|
|||
loader: true,
|
||||
status_bar: true,
|
||||
no_results_message: true,
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
custom_options: {
|
||||
cols:[3],
|
||||
texts: [
|
||||
|
@ -13191,12 +13196,7 @@
|
|||
'70px', '60px', '60px'
|
||||
],
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter('demo', filtersConfig);
|
||||
|
|
|
@ -633,7 +633,7 @@
|
|||
|
||||
<script data-config>
|
||||
var tfConfig = {
|
||||
base_path: './tablefilter/',
|
||||
base_path: 'tablefilter/',
|
||||
col_0: 'select',
|
||||
col_9: 'select',
|
||||
filters_row_index: 1,
|
||||
|
@ -643,17 +643,17 @@ var tfConfig = {
|
|||
btn_reset: true,
|
||||
btn_reset_text: "Clear",
|
||||
loader: true,
|
||||
col_number_format: [
|
||||
null, null, null,
|
||||
null, 'EU', 'US',
|
||||
null, null, null,
|
||||
null
|
||||
],
|
||||
col_date_type: [
|
||||
null, null, null,
|
||||
null, null, null,
|
||||
null, 'dmy', 'mdy',
|
||||
null
|
||||
col_types: [
|
||||
'none',
|
||||
'string',
|
||||
'number',
|
||||
'string',
|
||||
{ type: 'formatted-number', decimal: ',', thousands: '.' },
|
||||
'formatted-number',
|
||||
'string',
|
||||
{ type: 'date', locale: 'en-GB' },
|
||||
'date',
|
||||
'none'
|
||||
],
|
||||
|
||||
/* custom filtering with custom_cell_data delegate */
|
||||
|
@ -675,13 +675,7 @@ var tfConfig = {
|
|||
|
||||
/* Column sorting extension */
|
||||
extensions: [{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'none', 'string', 'string',
|
||||
'string', 'eu', 'us',
|
||||
'string', 'dmydate', 'mdydate',
|
||||
'none'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter('demo', tfConfig);
|
||||
|
|
114
data-types.html
114
data-types.html
|
@ -181,16 +181,59 @@
|
|||
|
||||
<h1>Data types, column operations</h1>
|
||||
|
||||
<p>This example features 3 date types and 2 numeric formatting for the currency
|
||||
columns:</p>
|
||||
<p>
|
||||
This example shows how to define column types with the
|
||||
<code>col_types</code> option and specifically numeric formats with:
|
||||
</p>
|
||||
<ul>
|
||||
<li>"." thousands separator and "," decimal separator for €</li>
|
||||
<li>"," thousands separator and "." decimal separator for US$</li>
|
||||
<li>"." thousands separator and "," decimal separator for € column</li>
|
||||
<li>"," thousands separator and "." decimal separator for US$ column</li>
|
||||
</ul>
|
||||
<p>
|
||||
along with date types with <code>locale</code> and <code>format</code> specified on
|
||||
a column basis.
|
||||
</p>
|
||||
|
||||
<div class="alert alert-info" role="alert">
|
||||
Use the <code>col_number_format</code> property to set numeric formats
|
||||
('EU', 'US' or 'IPADDRESS') and <code>col_date_type</code> to set date
|
||||
types.
|
||||
<code>col_type</code> property sets data types on a column basis, below a list
|
||||
of types it can now support:
|
||||
<ul>
|
||||
<li><code>string</code> (default column type if none specified)</li>
|
||||
<li><code>number</code> (unformatted number)</li>
|
||||
<li>
|
||||
<code>formatted-number</code>
|
||||
(formatted number with '.' decimal separator and
|
||||
',' thousands separator) or
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<code>{ type: 'formatted-number', decimal: ',', thousands: '.' }</code>
|
||||
for extended customisation
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<code>date</code>
|
||||
defaulting to <code>en</code> locale or
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<code>{ type: 'date', locale: 'en-GB', format: ['{dd}-{months}-{yyyy|yy}'] }</code>
|
||||
for extended customisation <sup><strong>*</strong></sup>
|
||||
</li>
|
||||
</ul>
|
||||
</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>
|
||||
<hr>
|
||||
<p>
|
||||
<sup><strong>*</strong></sup>
|
||||
To learn more about supported date formats and locales:<br>
|
||||
<a href="https://sugarjs.com/docs/#/DateFormatting" target="_blank">
|
||||
https://sugarjs.com/docs/#/DateFormatting</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -598,29 +641,29 @@
|
|||
btn_reset: true,
|
||||
loader: true,
|
||||
status_bar: true,
|
||||
col_number_format: [
|
||||
null, null, null,
|
||||
'EU', 'US', null,
|
||||
null, null, null,
|
||||
'IpAddress'
|
||||
],
|
||||
col_date_type: [
|
||||
null, null, null,
|
||||
null, null, null,
|
||||
'dmy', 'mdy', 'ddmmmyyyy',
|
||||
null
|
||||
col_types: [
|
||||
'string',
|
||||
'string',
|
||||
'string',
|
||||
{ type: 'formatted-number', decimal: ',', thousands: '.' },
|
||||
'formatted-number', // defaults to '.' for decimal and ',' for thousands
|
||||
'string',
|
||||
{ type: 'date', locale: 'fr' },
|
||||
{ type: 'date', locale: 'en', format: '{dd}-{MM}-{yyyy|yy}' }, // extends 'en' locale with additional format
|
||||
{ type: 'date', locale: 'en', format: ['{dd}-{months}-{yyyy|yy}'] },
|
||||
'ipaddress'
|
||||
],
|
||||
rows_always_visible: [totRowIndex],
|
||||
on_filters_loaded: function(o){
|
||||
o.setFilterValue(3, '>1.000');
|
||||
o.setFilterValue(4, '<2,500');
|
||||
o.setFilterValue(6, '>23-01-95');
|
||||
o.filter();
|
||||
on_filters_loaded: function(tf){
|
||||
tf.setFilterValue(3, '>1.000');
|
||||
tf.setFilterValue(4, '<2,500');
|
||||
tf.setFilterValue(6, '>23-01-95');
|
||||
tf.setFilterValue(8, '<2000');
|
||||
tf.filter();
|
||||
},
|
||||
extensions:[
|
||||
{ name: 'sort' },
|
||||
{
|
||||
name: 'sort'
|
||||
},{
|
||||
name: 'colOps',
|
||||
id: ['sum1', 'sum2'],
|
||||
col: [3, 4],
|
||||
|
@ -633,14 +676,18 @@
|
|||
}
|
||||
]
|
||||
};
|
||||
|
||||
var tf = new TableFilter('demo-tot', tfConfig);
|
||||
tf.init();
|
||||
</script>
|
||||
|
||||
<hr style="visibility:hidden;">
|
||||
<p></p>
|
||||
<p>Below an example of ISO date support (YMD). Use <code>default_date_type</code>
|
||||
to set a date type for a whole table ('DMY','MDY','YMD').</p>
|
||||
<p>
|
||||
Below an example of ISO date support ({yyyy|yy}/{MM}/{dd}).
|
||||
Use <code>locale</code> to set a locale globally
|
||||
(defaults to 'en').
|
||||
</p>
|
||||
|
||||
|
||||
<table id="demo" class="dummy">
|
||||
|
@ -1157,12 +1204,17 @@
|
|||
btn_reset: true,
|
||||
loader: true,
|
||||
status_bar: true,
|
||||
default_date_type: 'YMD',
|
||||
on_filters_loaded: function(o){
|
||||
o.setFilterValue(5, '>95-05-18');
|
||||
o.filter();
|
||||
locale: 'en-US',
|
||||
col_types: [
|
||||
'string', 'number', 'string',
|
||||
'number', 'string', 'date'
|
||||
],
|
||||
on_filters_loaded: function(tf){
|
||||
tf.setFilterValue(5, '>95-05-18');
|
||||
tf.filter();
|
||||
}
|
||||
};
|
||||
|
||||
var tf2 = new TableFilter('demo', tf2Config);
|
||||
tf2.init();
|
||||
</script>
|
||||
|
|
|
@ -13171,13 +13171,13 @@
|
|||
'100px', '100px', '100px',
|
||||
'100px', '100px', '100px'
|
||||
],
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter('demo', filtersConfig);
|
||||
|
|
|
@ -706,10 +706,10 @@
|
|||
loader: true,
|
||||
status_bar: true,
|
||||
status_bar_target_id: 'statusDiv',
|
||||
col_number_format: [
|
||||
null, null, 'US',
|
||||
'US', 'US', 'US',
|
||||
'US', 'US', 'US'
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
display_all_text: " [ Show all ] ",
|
||||
col_0: "multiple",
|
||||
|
|
|
@ -13180,13 +13180,13 @@
|
|||
col_0: 'select',
|
||||
col_1: 'select',
|
||||
col_2: 'select',
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter(document.querySelector('#demo'), tfConfig);
|
||||
|
|
|
@ -781,10 +781,10 @@
|
|||
rows_counter_text: 'Records: ',
|
||||
btn_reset: true,
|
||||
loader: true,
|
||||
col_number_format: [
|
||||
null, null, 'US',
|
||||
'US', 'US', 'US',
|
||||
'US', 'US', 'US'
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
|
||||
/* sorting feature */
|
||||
|
|
|
@ -183,18 +183,19 @@
|
|||
|
||||
<p>
|
||||
This demo shows how to filter and sort a column containing images by using
|
||||
the <code>custom_cell_data</code> delegate and defining a
|
||||
<code>data-tf-sortKey</code> attribute in the cells of the column.
|
||||
the <code>custom_cell_data</code> cell parser delegate and by defining the
|
||||
<code>data-tf-sortKey</code> custom DOM attribute.
|
||||
</p>
|
||||
|
||||
<div class="alert alert-info" role="alert">
|
||||
<code>TableFilter</code> automatically detects the presence of the
|
||||
<code>data-tf-sortKey</code> attibute in a cell. If the <code>sort</code>
|
||||
extension is enabled the sort mechanism will sort based the column on the
|
||||
extension is enabled the sort mechanism will sort that column based on the
|
||||
value specified in the <code>data-tf-sortKey</code> attibute.
|
||||
</div>
|
||||
|
||||
|
||||
<div data-config>
|
||||
|
||||
<table id="demo">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@ -523,6 +524,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script src="tablefilter/tablefilter.js"></script>
|
||||
|
@ -533,13 +535,9 @@ var tfConfig = {
|
|||
base_path: './tablefilter/',
|
||||
filters_row_index: 2,
|
||||
headers_row_index: 1,
|
||||
col_number_format: [
|
||||
null, null, null,
|
||||
'US', null, null, null
|
||||
],
|
||||
col_date_type: [
|
||||
null, null, null,
|
||||
null, null, null, 'mdy'
|
||||
col_types: [
|
||||
'string', 'string', 'string',
|
||||
'number', 'string', 'string', 'date'
|
||||
],
|
||||
rows_counter: true,
|
||||
rows_counter_text: 'Books: ',
|
||||
|
|
|
@ -762,6 +762,10 @@
|
|||
'200px','60px','125px',
|
||||
'100px','250px','100px'
|
||||
],
|
||||
col_types: [
|
||||
'string', 'number', 'string',
|
||||
'number', 'string', 'date'
|
||||
],
|
||||
alternate_rows: true,
|
||||
btn_reset: true,
|
||||
rows_counter: true,
|
||||
|
@ -777,11 +781,7 @@
|
|||
grid_tbl_cont_css_class: 'grd-cont',
|
||||
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'string',
|
||||
'us', 'string', 'ymd'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter(
|
||||
|
|
|
@ -13177,13 +13177,13 @@
|
|||
"120px", "120px", "100px",
|
||||
"100px", "100px", "100px"
|
||||
],
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter('demo', filtersConfig);
|
||||
|
|
|
@ -9480,11 +9480,11 @@
|
|||
col_1: "select",
|
||||
col_2: "checklist",
|
||||
|
||||
// column number types
|
||||
col_number_format: [
|
||||
null, null, 'US',
|
||||
'US', 'US', 'US',
|
||||
'US', 'US', 'US'
|
||||
// column types
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
|
||||
// filters and headers position
|
||||
|
|
|
@ -2800,12 +2800,12 @@
|
|||
'75px', '150px', '200px',
|
||||
'100px', '100px', '350px'
|
||||
],
|
||||
col_types: [
|
||||
'number', 'string', 'string',
|
||||
'formatted-number', 'number', 'none'
|
||||
],
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'number', 'string', 'string',
|
||||
'US', 'none', 'none'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter('demo', filtersConfig);
|
||||
|
|
|
@ -2799,12 +2799,12 @@
|
|||
'75px', '150px', '200px',
|
||||
'100px', '100px', '350px'
|
||||
],
|
||||
col_types: [
|
||||
'number', 'string', 'string',
|
||||
'formatted-number', 'number', 'none'
|
||||
],
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'number', 'string', 'string',
|
||||
'US', 'none', 'none'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter('demo', filtersConfig);
|
||||
|
|
12
paging.html
12
paging.html
|
@ -13170,13 +13170,13 @@
|
|||
col_0: 'select',
|
||||
col_1: 'select',
|
||||
col_2: 'select',
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}]
|
||||
};
|
||||
var tf = new TableFilter('demo', filtersConfig);
|
||||
|
|
|
@ -13195,13 +13195,13 @@
|
|||
'100px', '100px', '100px',
|
||||
'100px', '100px', '100px'
|
||||
],
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
extensions:[{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
]
|
||||
name: 'sort'
|
||||
}, {
|
||||
name: 'colsVisibility',
|
||||
text: 'Hide columns:',
|
||||
|
|
|
@ -698,15 +698,15 @@
|
|||
col_0: 'multiple',
|
||||
col_1: 'select',
|
||||
col_2: 'checklist',
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
|
||||
// sorting extension
|
||||
extensions: [{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'string', 'number',
|
||||
'number', 'number', 'number',
|
||||
'number', 'number', 'number'
|
||||
],
|
||||
async_sort: true,
|
||||
on_after_sort: function(o, colIndex){
|
||||
document.querySelector('.badge').innerHTML =
|
||||
|
|
|
@ -472,15 +472,22 @@
|
|||
rows_counter: true,
|
||||
btn_reset: true,
|
||||
status_bar: true,
|
||||
col_types: [
|
||||
'string',
|
||||
'customtype',
|
||||
'number',
|
||||
'string',
|
||||
{ type: 'formatted-number', decimal: ',', thousands: '.' },
|
||||
'formatted-number',
|
||||
'string',
|
||||
{ type: 'date', locale: 'fr' },
|
||||
{ type: 'date', locale: 'en' }
|
||||
],
|
||||
|
||||
// Sort extension
|
||||
extensions: [{
|
||||
name: 'sort',
|
||||
types: [
|
||||
'string', 'customtype', 'string',
|
||||
'string', 'eu', 'us',
|
||||
'string', 'dmydate','mdydate'
|
||||
],
|
||||
|
||||
// Register custom sorter when sort extension is loaded
|
||||
on_sort_loaded: function(o, sort) {
|
||||
// addSortType accepts:
|
||||
|
|
30
sort.html
30
sort.html
|
@ -543,24 +543,24 @@ var tfConfig = {
|
|||
no_results_message: true,
|
||||
|
||||
// columns data types
|
||||
col_number_format: [
|
||||
null, null, null,
|
||||
'EU', 'US', null,
|
||||
null, null, null,
|
||||
'IpAddress'
|
||||
],
|
||||
col_date_type: [
|
||||
null, null, null,
|
||||
null, null, null,
|
||||
'dmy', 'mdy', 'ddmmmyyyy',
|
||||
null
|
||||
col_types: [
|
||||
'string',
|
||||
'string',
|
||||
'string',
|
||||
{ type: 'formatted-number', decimal: ',', thousands: '.' },
|
||||
'formatted-number', // defaults to '.' for decimal and ',' for thousands
|
||||
'string',
|
||||
{ type: 'date', locale: 'fr' },
|
||||
{ type: 'date', locale: 'en-US' },
|
||||
{ type: 'date', locale: 'en-US', format: ['{dd}-{months}-{yyyy|yy}'] },
|
||||
'ipaddress'
|
||||
],
|
||||
|
||||
// Sort extension: in this example the column data types are provided by the
|
||||
// 'col_number_format' and 'col_date_type' properties. The sort extension
|
||||
// also has a 'types' property defining the columns data type. If the
|
||||
// 'types' property is not defined, the sorting extension will check for
|
||||
// 'col_number_format' and 'col_date_type' properties.
|
||||
// 'col_types' property. The sort extension also has a 'types' property
|
||||
// defining the columns data type for column sorting. If the 'types'
|
||||
// property is not defined, the sorting extension will fallback to
|
||||
// the 'col_types' definitions.
|
||||
extensions: [{ name: 'sort' }]
|
||||
};
|
||||
var tf = new TableFilter('data-types', tfConfig);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* tablefilter v0.3.0 by Max Guglielmi
|
||||
* build date: 2016-10-05T02:23:13.021Z
|
||||
* build date: 2016-10-03T05:58:32.902Z
|
||||
* MIT License
|
||||
*/
|
||||
span.colVisSpan{text-align:left;}span.colVisSpan a.colVis{display:inline-block;padding:7px 5px 0;font-size:inherit;font-weight:inherit;vertical-align:top}div.colVisCont{position:relative;background:#fff;-webkit-box-shadow:3px 3px 2px #888;-moz-box-shadow:3px 3px 2px #888;box-shadow:3px 3px 2px #888;position:absolute;display:none;border:1px solid #ccc;height:auto;width:250px;background-color:#fff;margin:35px 0 0 -100px;z-index:10000;padding:10px 10px 10px 10px;text-align:left;font-size:12px;}div.colVisCont:after,div.colVisCont:before{bottom:100%;left:50%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}div.colVisCont:after{border-color:rgba(255,255,255,0);border-bottom-color:#fff;border-width:10px;margin-left:-10px}div.colVisCont:before{border-color:rgba(255,255,255,0);border-bottom-color:#ccc;border-width:12px;margin-left:-12px}div.colVisCont p{margin:6px auto 6px auto}div.colVisCont a.colVis{display:initial;font-weight:inherit}ul.cols_checklist{padding:0;margin:0;list-style:none;}ul.cols_checklist label{display:block}ul.cols_checklist input{vertical-align:middle;margin:2px 5px 2px 1px}li.cols_checklist_item{padding:4px;margin:0;}li.cols_checklist_item:hover{background-color:#335ea8;color:#fff}.cols_checklist_slc_item{background-color:#335ea8;color:#fff}
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* tablefilter v0.3.0 by Max Guglielmi
|
||||
* build date: 2016-10-05T02:23:13.021Z
|
||||
* build date: 2016-10-03T05:58:32.902Z
|
||||
* MIT License
|
||||
*/
|
||||
span.expClpFlt a.btnExpClpFlt{width:35px;height:35px;display:inline-block;}span.expClpFlt a.btnExpClpFlt:hover{background-color:#f4f4f4}span.expClpFlt img{padding:8px 11px 11px 11px}
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* tablefilter v0.3.0 by Max Guglielmi
|
||||
* build date: 2016-10-05T02:23:13.021Z
|
||||
* build date: 2016-10-03T05:58:32.902Z
|
||||
* MIT License
|
||||
*/
|
||||
.activeHeader{background-color:#66afe9 !important;color:#fff !important}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* tablefilter v0.3.0 by Max Guglielmi
|
||||
* build date: 2016-10-05T02:23:13.021Z
|
||||
* build date: 2016-10-03T05:58:32.902Z
|
||||
* MIT License
|
||||
*/
|
||||
table.TF{border-left:1px solid #ccc;border-top:none;border-right:none;border-bottom:none;}table.TF th{background:#ebecee url("images/bg_th.jpg") left top repeat-x;border-bottom:1px solid #d0d0d0;border-right:1px solid #d0d0d0;border-left:1px solid #fff;border-top:1px solid #fff;color:#333}table.TF td{border-bottom:1px dotted #999;padding:5px}.fltrow{background-color:#ebecee !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #666 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #999 !important}input.flt{width:99% !important}.inf{height:$min-height;background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important}input.reset{background:transparent url("images/btn_eraser.gif") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;}.nextPage:hover{background:transparent url("images/btn_over_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important;}.previousPage:hover{background:transparent url("images/btn_over_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;}.firstPage:hover{background:transparent url("images/btn_over_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;}.lastPage:hover{background:transparent url("images/btn_over_last_page.gif") center center no-repeat !important}div.grd_Cont{background-color:#ebecee !important;border:1px solid #ccc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#d5d5d5}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important;}div.grd_headTblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#ebecee url("images/bg_th.jpg") left top repeat-x !important;border-bottom:1px solid #d0d0d0 !important;border-right:1px solid #d0d0d0 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #999 !important}.grd_inf{background:#d7d7d7 url("images/bg_infDiv.jpg") 0 0 repeat-x !important;border-top:1px solid #d0d0d0 !important}.loader{border:1px solid #999}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#fff}.odd{background-color:#d5d5d5}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#999 !important}
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* tablefilter v0.3.0 by Max Guglielmi
|
||||
* build date: 2016-10-05T02:23:13.021Z
|
||||
* build date: 2016-10-03T05:58:32.902Z
|
||||
* MIT License
|
||||
*/
|
||||
table.TF{border-left:1px dotted #81963b;border-top:none;border-right:0;border-bottom:none;}table.TF th{background:#39424b url("images/bg_headers.jpg") left top repeat-x;border-bottom:0;border-right:1px dotted #d0d0d0;border-left:0;border-top:0;color:#fff}table.TF td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b;padding:5px}.fltrow{background-color:#81963b !important;}.fltrow th,.fltrow td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #687830 !important}input.flt{width:99% !important}.inf{background:#d8d8d8;height:$min-height}input.reset{width:53px;background:transparent url("images/btn_filter.png") center center no-repeat !important}.helpBtn:hover{background-color:transparent}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important}.previousPage{background:transparent url("images/btn_previous_page.gif") center center no-repeat !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important}div.grd_Cont{background:#81963b url("images/bg_headers.jpg") left top repeat-x !important;border:1px solid #ccc !important;padding:0 1px 1px 1px !important;}div.grd_Cont .even{background-color:#bccd83}div.grd_Cont .odd{background-color:#fff}div.grd_headTblCont{background-color:#ebecee !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important;}div.grd_tblCont table td{border-bottom:1px dotted #81963b;border-right:1px dotted #81963b}div.grd_tblCont table th,div.grd_headTblCont table th{background:transparent url("images/bg_headers.jpg") 0 0 repeat-x !important;border-bottom:0 !important;border-right:1px dotted #d0d0d0 !important;border-left:0 !important;border-top:0 !important;padding:0 4px 0 4px !important;color:#fff !important;height:35px !important}div.grd_headTblCont table td{border-bottom:1px dotted #39424b !important;border-right:1px dotted #fff !important;border-left:0 !important;border-top:0 !important;background-color:#81963b !important;padding:1px 3px 1px 3px !important}.grd_inf{background-color:#d8d8d8;border-top:1px solid #d0d0d0 !important}.loader{border:0 !important;background:#81963b !important}.defaultLoader{width:32px;height:32px;background:transparent url("images/img_loading.gif") 0 0 no-repeat !important}.even{background-color:#bccd83}.odd{background-color:#fff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.activeHeader{background:#81963b !important}
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* tablefilter v0.3.0 by Max Guglielmi
|
||||
* build date: 2016-10-05T02:23:13.021Z
|
||||
* build date: 2016-10-03T05:58:32.902Z
|
||||
* MIT License
|
||||
*/
|
||||
table.TF{padding:0;color:#000;border-right:1px solid #a4bed4;border-top:1px solid #a4bed4;border-left:1px solid #a4bed4;border-bottom:0;}table.TF th{margin:0;color:inherit;background:#d1e5fe url("images/bg_skyblue.gif") 0 0 repeat-x;border-color:#fdfdfd #a4bed4 #a4bed4 #fdfdfd;border-width:1px;border-style:solid}table.TF td{margin:0;padding:5px;color:inherit;border-bottom:1px solid #a4bed4;border-left:0;border-top:0;border-right:0}.fltrow{background-color:#d1e5fe !important;}.fltrow th,.fltrow td{padding:1px 3px 1px 3px !important}.flt,select.flt,select.flt_multi,.flt_s,.single_flt,.div_checklist{border:1px solid #a4bed4 !important}input.flt{width:99% !important}.inf{background-color:#e3efff !important;border:1px solid #a4bed4;height:$min-height;color:#004a6f}div.tot,div.status{border-right:0 !important}.helpBtn:hover{background-color:transparent}input.reset{background:transparent url("images/icn_clear_filters.png") center center no-repeat !important}.nextPage{background:transparent url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.nextPage:hover{background:#ffe4ab url("images/btn_next_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.previousPage{background:transparent url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.previousPage:hover{background:#ffe4ab url("images/btn_prev_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.firstPage{background:transparent url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.firstPage:hover{background:#ffe4ab url("images/btn_first_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.lastPage{background:transparent url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid transparent !important;}.lastPage:hover{background:#ffe4ab url("images/btn_last_page.gif") center center no-repeat !important;border:1px solid #ffb552 !important}.activeHeader{background:#ffe4ab !important;border:1px solid #ffb552 !important;color:inherit !important}div.grd_Cont{background-color:#d9eaed !important;border:1px solid #9cc !important;padding:0 !important;}div.grd_Cont .even{background-color:#fff}div.grd_Cont .odd{background-color:#e3efff}div.grd_headTblCont{background-color:#d9eaed !important;border-bottom:none !important}div.grd_tblCont table{border-right:none !important}div.grd_tblCont table th,div.grd_headTblCont table th,div.grd_headTblCont table td{background:#d9eaed url("images/bg_skyblue.gif") left top repeat-x;border-bottom:1px solid #a4bed4;border-right:1px solid #a4bed4 !important;border-left:1px solid #fff !important;border-top:1px solid #fff !important}div.grd_tblCont table td{border-bottom:1px solid #a4bed4 !important;border-right:0 !important;border-left:0 !important;border-top:0 !important}.grd_inf{background-color:#cce2fe;color:#004a6f;border-top:1px solid #9cc !important;}.grd_inf a{text-decoration:none;font-weight:bold}.loader{background-color:#2d8eef;border:1px solid #cce2fe;border-radius:5px}.even{background-color:#fff}.odd{background-color:#e3efff}span.expClpFlt a.btnExpClpFlt:hover{background-color:transparent !important}.ezActiveRow{background-color:#ffdc61 !important;color:inherit}.ezSelectedRow{background-color:#ffe4ab !important;color:inherit}.ezActiveCell{background-color:#fff !important;color:#000 !important;font-weight:bold}.ezETSelectedCell{background-color:#fff !important;font-weight:bold;color:#000 !important}
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* tablefilter v0.3.0 by Max Guglielmi
|
||||
* build date: 2016-10-05T02:23:13.003Z
|
||||
* build date: 2016-10-03T05:58:32.886Z
|
||||
* MIT License
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
* tablefilter v0.3.0 by Max Guglielmi
|
||||
* build date: 2016-10-05T02:23:13.003Z
|
||||
* build date: 2016-10-03T05:58:32.886Z
|
||||
* MIT License
|
||||
*/
|
||||
|
||||
|
|
|
@ -478,13 +478,9 @@
|
|||
filters_row_index: 2,
|
||||
headers_row_index: 1,
|
||||
sort: true,
|
||||
col_number_format: [
|
||||
null, null, 'US',
|
||||
null, null, null
|
||||
],
|
||||
col_date_type: [
|
||||
null, null, null,
|
||||
null, null, 'mdy'
|
||||
col_types: [
|
||||
'string', 'string', 'number',
|
||||
'string', 'string', 'date'
|
||||
],
|
||||
rows_counter: true,
|
||||
rows_counter_text: 'Books: ',
|
||||
|
|
Loading…
Reference in a new issue