1
0
Fork 0
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:
Max Guglielmi 2015-06-02 17:33:16 +10:00
commit c54e90162f
8 changed files with 250 additions and 57 deletions

View file

@ -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],