mirror of
https://github.com/koalyptus/TableFilter.git
synced 2026-03-16 15:45:45 +01:00
Added filter with custom options logic + tests
This commit is contained in:
parent
bbd8997651
commit
c54e90162f
8 changed files with 250 additions and 57 deletions
|
|
@ -86,6 +86,7 @@
|
|||
<button onclick="tf.init();">Reset</button>
|
||||
</div>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="../build/tablefilter/themes/skyblue/skyblue.css">
|
||||
<script type="text/javascript" src="../build/tablefilter/tablefilter.js"></script>
|
||||
<script>
|
||||
var table = document.getElementById('demo');
|
||||
|
|
@ -93,7 +94,8 @@
|
|||
|
||||
var tf = new TableFilter("demo", {
|
||||
col_0: 'select',
|
||||
col_3: 'checklist',
|
||||
col_2: 'checklist',
|
||||
col_3: 'select',
|
||||
base_path: '../build/tablefilter/',
|
||||
rows_counter: true,
|
||||
// enable_default_theme: true,
|
||||
|
|
@ -109,13 +111,19 @@
|
|||
remember_grid_values: true,
|
||||
col_widths: ['150px','150px','150px','200px','150px'],
|
||||
btn_reset: true,
|
||||
grid_layout: true,
|
||||
grid_layout: false,
|
||||
sort: true,
|
||||
sort_config: {
|
||||
sort_types: ['string','string','number','number','number']
|
||||
},
|
||||
|
||||
rows_always_visible: [totRowIndex],
|
||||
custom_options: {
|
||||
cols: [3],
|
||||
texts: [['0-0.5', '0.5-1', '1-2', '>2']],
|
||||
values: [['>0 && <=0.5', '>0.5 && <=1', '>1 && <=2', '>2']],
|
||||
sorts: [false]
|
||||
},
|
||||
col_operation: {
|
||||
id: ["sum1", "sum2"],
|
||||
col: [2, 3],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue