1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-03 07:03:33 +02:00

Added external filters demo

This commit is contained in:
Max Guglielmi 2015-06-13 23:53:28 +10:00
parent 3c80a855bb
commit a0b2de403b
19 changed files with 26343 additions and 7 deletions

View file

@ -17,6 +17,13 @@
background-color: #F7F7F7;
border-radius: 3px;
}
.panel{
float: left;
background: #F7F7F7 none repeat scroll 0% 0%;
width: 250px;
margin-right: 2em;
padding: 1em;
}
</style>
</head>
<body>

View file

@ -17,6 +17,13 @@
background-color: #F7F7F7;
border-radius: 3px;
}
.panel{
float: left;
background: #F7F7F7 none repeat scroll 0% 0%;
width: 250px;
margin-right: 2em;
padding: 1em;
}
</style>
</head>
<body>

View file

@ -17,6 +17,13 @@
background-color: #F7F7F7;
border-radius: 3px;
}
.panel{
float: left;
background: #F7F7F7 none repeat scroll 0% 0%;
width: 250px;
margin-right: 2em;
padding: 1em;
}
</style>
</head>
<body>

13107
examples/external-filters.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -17,6 +17,13 @@
background-color: #F7F7F7;
border-radius: 3px;
}
.panel{
float: left;
background: #F7F7F7 none repeat scroll 0% 0%;
width: 250px;
margin-right: 2em;
padding: 1em;
}
</style>
</head>
<body>

View file

@ -17,6 +17,13 @@
background-color: #F7F7F7;
border-radius: 3px;
}
.panel{
float: left;
background: #F7F7F7 none repeat scroll 0% 0%;
width: 250px;
margin-right: 2em;
padding: 1em;
}
</style>
</head>
<body>

View file

@ -17,6 +17,13 @@
background-color: #F7F7F7;
border-radius: 3px;
}
.panel{
float: left;
background: #F7F7F7 none repeat scroll 0% 0%;
width: 250px;
margin-right: 2em;
padding: 1em;
}
</style>
</head>
<body>

View file

@ -17,6 +17,13 @@
background-color: #F7F7F7;
border-radius: 3px;
}
.panel{
float: left;
background: #F7F7F7 none repeat scroll 0% 0%;
width: 250px;
margin-right: 2em;
padding: 1em;
}
</style>
</head>
<body>

13047
examples/old/demo.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
<html lang="en">
<head>
<title>HTML Table Filter Generator</title>
<link rel="stylesheet" type="text/css" href="../dist/tablefilter/style/tablefilter.css">
<link rel="stylesheet" type="text/css" href="../../dist/tablefilter/style/tablefilter.css">
</head>
<body>
<div id="test"></div>
@ -86,7 +86,7 @@
<button onclick="tf.init();">Reset</button>
</div>
<script type="text/javascript" src="../dist/tablefilter/tablefilter.js"></script>
<script type="text/javascript" src="../../dist/tablefilter/tablefilter.js"></script>
<script>
var table = document.getElementById('demo');
var totRowIndex = table.getElementsByTagName("tr").length;
@ -95,7 +95,7 @@
col_0: 'select',
col_2: 'checklist',
col_3: 'select',
base_path: '../dist/tablefilter/',
base_path: '../../dist/tablefilter/',
// fill_slc_on_demand: true,
rows_counter: true,
// enable_default_theme: true,
@ -143,9 +143,9 @@
types: ['string', 'string', 'number', 'number', 'number']
},{
name: 'advancedGrid',
vendor_path: '../libs/ezEditTable/',
// filename: 'ezEditTable_min.js',
// vendor_path: 'http://edittable.free.fr/ezEditTable/',
// vendor_path: '../../libs/ezEditTable/',
filename: 'ezEditTable_min.js',
vendor_path: 'http://edittable.free.fr/ezEditTable/',
selectable: true,
editable: true,
default_selection: 'both',

View file

@ -17,6 +17,13 @@
background-color: #F7F7F7;
border-radius: 3px;
}
.panel{
float: left;
background: #F7F7F7 none repeat scroll 0% 0%;
width: 250px;
margin-right: 2em;
padding: 1em;
}
</style>
<style type="text/css">
/**

View file

@ -13,4 +13,11 @@
background-color: #F7F7F7;
border-radius: 3px;
}
.panel{
float: left;
background: #F7F7F7 none repeat scroll 0% 0%;
width: 250px;
margin-right: 2em;
padding: 1em;
}
</style>

View file

@ -0,0 +1,119 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{NAME} v{VERSION} - External Filters Demo</title>
<!-- @import partials/style.html -->
</head>
<body>
<h1>{NAME} v{VERSION}</h1>
<h2>External filters demo</h2>
<p>
This demo shows how generate the column filters in an external container.
</p>
<div id="extGrid" class="panel">
<label>Choose Country:</label><br>
<span id="slcCountry"></span><br>
<span>Keep Ctrl/Cmd key pressed for multiple selections</span><br><br>
<label>Choose Country code:</label><br>
<span id="slcCode"></span><br><br>
<label>Choose year:</label><br>
<span id="slcYear"></span><br><br>
<label for="inpPop">POP:</label><br>
<span id="inpPop"></span><br><br>
<form id="frmRadioInps" name="frmRadioInps">
<label for="rdoXRat">XRAT:</label><br>
<input type="checkbox" id="rdoXRat" name="rdoXRat" value="!NA"
onclick="
if(this.checked){
tf.setFilterValue(4, this.value);
} else tf.setFilterValue(4, '');
tf.filter();" >Not NA
<br><br>
<label for="chkCI">CI:</label><br>
<input type="radio" id="chkCI" name="chkCI" value=">0 && <=10"
onclick="
if(this.checked){
tf.setFilterValue(8, this.value);
tf.filter();
}" > 0 - 10
<input type="radio" id="chkCI" name="chkCI" value=">10 && <=20"
onclick="
if(this.checked){
tf.setFilterValue(8, this.value);
tf.filter();
}" > 10 - 20
<input type="radio" id="chkCI" name="chkCI" value=">20 && <=30"
onclick="
if(this.checked){
tf.setFilterValue(8, this.value);
tf.filter();
}" > 20 - 30
</form>
<hr>
<div style="float:left;">
<input id="btnFlt" value="Filter" type="button"
onclick="tf.filter();" >&nbsp;
<input id="btnClr" value="Clear" type="button"
onclick="tf.clearFilters();
//clears radio btns
for( var o=frmRadioInps.elements, p=o.length - 1; p > -1; p--) {
if ( o[p].type ){
o[p].checked = false;
}
}
" >
</div>
<div id="statusDiv"></div>
<div style="clear:both;"></div>
</div>
<!-- @import partials/pre.html -->
<!-- @import partials/countries-table.html -->
<!-- @import partials/tablefilter-script.html -->
<script data-config>
var tfConfig = {
base_path: '../dist/tablefilter/',
alternate_rows: true,
rows_counter: true,
rows_counter_text: "Displayed rows: ",
loader: true,
status: true,
status_bar: true,
status_bar_target_id: 'statusDiv',
col_number_format: [
null, null, 'US',
'US', 'US', 'US',
'US', 'US', 'US'
],
display_all_text: " [ Show all ] ",
col_0: "multiple",
col_1: "select",
col_2: "checklist",
col_4: "none",
col_8: "none",
external_flt_grid: true,
external_flt_grid_ids: [
'slcCountry',
'slcCode',
'slcYear',
'inpPop'
],
/* Sorting feature */
extensions: [{ name: 'sort' }]
};
var tf = new TableFilter('demo', tfConfig);
tf.init();
</script>
<!-- @import partials/pre-inline-script.html -->
</body>
</html>

View file

@ -14,7 +14,7 @@
</p>
<!-- @import partials/pre.html -->
<!-- @import partials/books-table-images.html -->
<!-- @import partials/books-table-with-images.html -->
<!-- @import partials/tablefilter-script.html -->
<script data-config>