mirror of
https://github.com/koalyptus/TableFilter.git
synced 2024-06-03 06:22:34 +02:00
Generated by grunt gh-pages
This commit is contained in:
parent
60211d1bad
commit
fea9ec5446
|
@ -195,8 +195,9 @@
|
|||
|
||||
|
||||
<p><a href="https://travis-ci.org/koalyptus/TableFilter"><img src="https://api.travis-ci.org/koalyptus/TableFilter.svg?branch=master" alt="Build Status"></a>
|
||||
<a href="https://koalyptus.github.io/TableFilter/docs/source"><img src="http://koalyptus.github.io/TableFilter/docs/badge.svg" alt="Document"></a>
|
||||
<a href="https://codecov.io/gh/koalyptus/TableFilter"><img src="https://codecov.io/gh/koalyptus/TableFilter/branch/master/graph/badge.svg" alt="codecov"></a></p>
|
||||
<a href="https://koalyptus.github.io/TableFilter/docs/source.html"><img src="https://koalyptus.github.io/TableFilter/docs/badge.svg" alt="Document"></a>
|
||||
<a href="https://codecov.io/gh/koalyptus/TableFilter"><img src="https://codecov.io/gh/koalyptus/TableFilter/branch/master/graph/badge.svg" alt="codecov"></a>
|
||||
<a href="https://greenkeeper.io/"><img src="https://badges.greenkeeper.io/koalyptus/TableFilter.svg" alt="Greenkeeper badge"></a></p>
|
||||
<h1 id="tablefilter">TableFilter</h1>
|
||||
<blockquote>
|
||||
<p>A Javascript library making HTML tables filterable</p>
|
||||
|
|
|
@ -244,6 +244,12 @@
|
|||
<input id="chxCounter" type="checkbox" checked class="form-control"
|
||||
onclick="toggleRowsCounter(event);">
|
||||
</div>
|
||||
|
||||
<div class="navbar-form navbar-left">
|
||||
<label for="chxGridLayout">Grid layout:</label>
|
||||
<input id="chxGridLayout" type="checkbox" checked class="form-control"
|
||||
onclick="toggleGridLayout(event);">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -758,24 +764,45 @@
|
|||
}
|
||||
}
|
||||
|
||||
var tf = new TableFilter(
|
||||
document.querySelector('.countries-tiny'),
|
||||
{
|
||||
base_path: 'tablefilter/',
|
||||
alternate_rows: true,
|
||||
rows_counter: true,
|
||||
paging: true,
|
||||
col_widths: [
|
||||
'120px','120px','120px',
|
||||
'120px','120px','120px',
|
||||
'120px','120px','120px'
|
||||
],
|
||||
on_filters_loaded: function(tf){
|
||||
// hide the filters row
|
||||
tf.dom().rows[tf.getFiltersRowIndex()].style.display = 'none';
|
||||
// Toggle grid-layout mode
|
||||
function toggleGridLayout(evt){
|
||||
var chx = evt.target;
|
||||
|
||||
tf.destroy();
|
||||
tf = createTableFilter(chx.checked);
|
||||
tf.init();
|
||||
}
|
||||
|
||||
|
||||
function createTableFilter(gridLayout) {
|
||||
return new TableFilter(
|
||||
document.querySelector('.countries-tiny'),
|
||||
{
|
||||
base_path: 'tablefilter/',
|
||||
alternate_rows: true,
|
||||
rows_counter: true,
|
||||
paging: true,
|
||||
grid_layout: gridLayout ? {
|
||||
width: '100%',
|
||||
height: '350px'
|
||||
} : false,
|
||||
col_widths: [
|
||||
'120px','120px','120px',
|
||||
'120px','120px','120px',
|
||||
'120px','120px','120px'
|
||||
],
|
||||
on_filters_loaded: function(tf){
|
||||
var dom = tf.gridLayout ?
|
||||
tf.feature('gridLayout').headTbl : tf.dom();
|
||||
|
||||
// hide the filters row
|
||||
dom.rows[tf.getFiltersRowIndex()].style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
var tf = createTableFilter(true);
|
||||
tf.init();
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in a new issue