mirror of
https://github.com/koalyptus/TableFilter.git
synced 2026-03-18 08:29:50 +01:00
Clean gruntfile and build steps
This commit is contained in:
parent
75090d7053
commit
eef326e6b0
154 changed files with 748 additions and 27295 deletions
|
|
@ -1,185 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>HTML Table Filter Generator</title>
|
||||
<link href="../dev/filtergrid.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript">
|
||||
var tf;
|
||||
</script>
|
||||
<style>
|
||||
.test{ color: red !important; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<p align="right">
|
||||
<input type="button" value="Remove grid" onclick="tf.remove();" />
|
||||
<input type="button" value="Reset grid" onclick="tf.init();" />
|
||||
<input type="button" value="Reset paging"
|
||||
onclick="
|
||||
if( tf.paging ) return;
|
||||
tf.Cpt.paging.addPaging();" >
|
||||
<input type="button" value="Remove paging"
|
||||
onclick="
|
||||
if( !tf.paging ) return;
|
||||
tf.paging = false; //behaviour is removed here
|
||||
tf.Cpt.paging.destroy();
|
||||
tf.filter();" >
|
||||
</p>
|
||||
<div id="test_cont">sss</div>
|
||||
<div style="width: 500px;">
|
||||
<table id="demo" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>From</th>
|
||||
<th>Destination</th>
|
||||
<th>Road Distance (km)</th>
|
||||
<th>By Air (hrs)</th>
|
||||
<th>By Rail (hrs)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong>Sydney</strong></td>
|
||||
<td>Adelaide</td>
|
||||
<td>1412</td>
|
||||
<td>1.4</td>
|
||||
<td>25.3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Sydney</strong></td>
|
||||
<td>Brisbane</td>
|
||||
<td>982</td>
|
||||
<td>1.5</td>
|
||||
<td>16</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Sydney</strong></td>
|
||||
<td>Canberra</td>
|
||||
<td>286</td>
|
||||
<td>.6</td>
|
||||
<td>4.3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Sydney</strong></td>
|
||||
<td>Melbourne</td>
|
||||
<td>872</td>
|
||||
<td>1.1</td>
|
||||
<td>10.5</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Adelaide</strong></td>
|
||||
<td>Perth</td>
|
||||
<td>2781</td>
|
||||
<td>3.1</td>
|
||||
<td>38</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Adelaide</strong></td>
|
||||
<td>Alice Springs</td>
|
||||
<td>1533</td>
|
||||
<td>2</td>
|
||||
<td>20.25</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Adelaide</strong></td>
|
||||
<td>Brisbane</td>
|
||||
<td>2045</td>
|
||||
<td>2.15</td>
|
||||
<td>40</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script src="../libs/requirejs/require.js"></script>
|
||||
<script>
|
||||
requirejs(['../dev/tablefilter'], function(mod){
|
||||
// Your logic here
|
||||
var TableFilter = mod.TableFilter;
|
||||
tf = new TableFilter("demo", {
|
||||
col_0: 'select',
|
||||
col_2: 'multiple',
|
||||
col_3: 'checklist',
|
||||
base_path: '../dev/',
|
||||
loader: false,
|
||||
rows_counter: true,
|
||||
enable_default_theme: false,
|
||||
// slc_filling_method: 'innerhtml',
|
||||
sort: true,
|
||||
sort_config: {
|
||||
sort_types: ['string','string','number','number','number']
|
||||
},
|
||||
paging: false,
|
||||
paging_length: 4,
|
||||
// page_selector_type: 'input',
|
||||
//results_per_page: ['Results per page', [2,4,6]],
|
||||
remember_grid_values: true,
|
||||
// remember_page_number: true,
|
||||
// remember_page_length: true,
|
||||
fill_slc_on_demand: false,
|
||||
linked_filters: false,
|
||||
popup_filters: false,
|
||||
alternate_rows: true,
|
||||
highlight_keywords: true,
|
||||
match_case: false,
|
||||
btn_reset: true,
|
||||
status_bar: true,
|
||||
watermark: [null, 'Filter column...', null, null, 'Helo'],
|
||||
selectable: false,
|
||||
editable: false,
|
||||
ezEditTable_config:{
|
||||
default_selection: 'both',
|
||||
loadStylesheet: true
|
||||
},
|
||||
grid_layout: true,
|
||||
grid_width: '600px',
|
||||
// grid_height: '200px',
|
||||
on_before_show_msg: function(tf){
|
||||
// console.log('on_before_show_msg');
|
||||
},
|
||||
|
||||
extensions: [{
|
||||
/*** Columns Visibility Manager extension load ***/
|
||||
name: 'colsVisibility',
|
||||
path: '../dev/extensions/colsVisibility',
|
||||
description: 'Columns visibility manager',/*
|
||||
initialize: function(o){o.SetColsVisibility();}*/
|
||||
// manager: true,
|
||||
tick_to_hide: true,
|
||||
// headers_table: true,
|
||||
// container_target_id: 'test_cont',
|
||||
// headers_text: ['1','2','3','4','5','6'],
|
||||
btn_target_id: 'test_cont',
|
||||
// btn_text: 'Hola',
|
||||
// btn_html: '<button>Columns</button>',
|
||||
// btn_css_class: 'test',
|
||||
// btn_close_text: 'jj',
|
||||
// btn_close_html: '<button>close</button>',
|
||||
// btn_close_css_class: 'test',
|
||||
// stylesheet: 'hola.css',
|
||||
// cont_css_class: 'test',
|
||||
// checklist_item_css_class: 'test',
|
||||
// at_start: [0,1,2,3,4],
|
||||
// enable_hover: true,
|
||||
enable_tick_all: true
|
||||
// ,
|
||||
// tick_all_text: 'Hola',
|
||||
// text: 'tutu',
|
||||
// on_loaded: function(){ console.log(arguments); },
|
||||
// on_before_open: function(){ console.log('on_before_open', arguments); },
|
||||
// on_after_open: function(){ console.log('on_after_open',arguments); },
|
||||
// on_before_close: function(){ console.log('on_before_close',arguments); },
|
||||
// on_after_close: function(){ console.log('on_after_close',arguments); },
|
||||
// on_before_col_hidden: function(){ console.log('on_before_col_hidden',arguments); },
|
||||
// on_after_col_hidden: function(){ console.log('on_after_col_hidden',arguments); },
|
||||
// on_before_col_displayed: function(){ console.log('on_before_col_displayed',arguments); },
|
||||
// on_after_col_displayed: function(){ console.log('on_after_col_displayed',arguments); }
|
||||
}]
|
||||
});
|
||||
|
||||
tf.init();
|
||||
});
|
||||
</script>
|
||||
<button onclick="javascript:tf.ExtRegistry.ColsVisibility.toggleCol(2);">Toggle col 2</button>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue