1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2026-03-16 15:45:45 +01:00

Refactored ezEditTable extension

This commit is contained in:
Max Guglielmi 2015-05-17 19:35:49 +10:00
commit e29c024fa3
5 changed files with 507 additions and 474 deletions

View file

@ -4,77 +4,84 @@
<title>HTML Table Filter Generator</title>
</head>
<body>
<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 width="15%">By Rail (hrs)</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Tot:</td>
<td></td>
<td id="sum1"></td>
<td id="sum2"></td>
<td></td>
</tr>
</tfoot>
<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 style="width:800px;">
<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 width="15%">By Rail (hrs)</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Tot:</td>
<td></td>
<td id="sum1"></td>
<td id="sum2"></td>
<td></td>
</tr>
</tfoot>
<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>
<div>
<button onclick="tf.ExtRegistry.advancedGrid.destroy();">Remove ezEditTable</button>
<button onclick="tf.ExtRegistry.advancedGrid.reset();">Reset ezEditTable</button>
</div>
<script type="text/javascript" src="../build/tablefilter/tablefilter.js"></script>
<script>
@ -111,16 +118,24 @@
decimal_precision: [0, 2],
tot_row_index: [totRowIndex, totRowIndex]
},
selectable: true,
editable: true,
ezEditTable_config: {
path: '../libs/ezEditTable/ezEditTable.js'
},
// selectable: true,
// editable: true,
// ezEditTable_config: {
// path: '../libs/ezEditTable/ezEditTable.js',
// default_selection: 'both',
// auto_save: false
// },
extensions: [{
name: 'advancedGrid',
vendor_path: '../libs/ezEditTable/',
selectable: true,
editable: true,
default_selection: 'both',
auto_save: false
},{
/*** Columns Visibility Manager extension load ***/
name: 'colsVisibility',
description: 'Columns visibility manager',/*
initialize: function(o){o.SetColsVisibility();}*/
description: 'Columns visibility manager',
// manager: true,
tick_to_hide: true,
// headers_table: true,