2015-06-28 03:56:40 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<title>{NAME} v{VERSION} - Development workflow with RequireJs</title>
|
|
|
|
<!-- @import partials/style.html -->
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>{NAME} v{VERSION}</h1>
|
|
|
|
<h2>Development workflow with RequireJs</h2>
|
2015-06-29 10:23:02 +02:00
|
|
|
<p>
|
|
|
|
To take advantage of the RequireJs development workflow use the
|
|
|
|
<code>grunt dev-modules</code> command.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
If you use extensions, you will need to specify the extensions path as per
|
|
|
|
configuration example. Sorting feature also requires the third-party
|
|
|
|
<code>../libs/sortabletable</code> dependency to be imported.
|
|
|
|
</p>
|
2015-06-28 03:56:40 +02:00
|
|
|
|
|
|
|
<!-- @import partials/pre.html -->
|
|
|
|
|
|
|
|
<!-- @import partials/countries-by-continent.html -->
|
|
|
|
|
|
|
|
<script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.17/require.min.js"></script>
|
|
|
|
<script data-config>
|
|
|
|
requirejs(
|
2015-06-29 10:23:02 +02:00
|
|
|
['../dist/tablefilter/tablefilter', '../libs/sortabletable'],
|
2015-06-28 03:56:40 +02:00
|
|
|
function(mod){
|
|
|
|
var TableFilter = mod.TableFilter;
|
|
|
|
var tfConfig = {
|
|
|
|
base_path: '../dist/tablefilter/',
|
|
|
|
col_1: 'multiple',
|
|
|
|
col_2: 'checklist',
|
|
|
|
alternate_rows: true,
|
|
|
|
rows_counter: true,
|
|
|
|
enable_default_theme: true,
|
|
|
|
col_widths: [
|
|
|
|
'70px', '170px', '170px',
|
|
|
|
'110px', '90px', '250px'
|
|
|
|
],
|
|
|
|
extensions:[
|
|
|
|
{
|
|
|
|
name: 'sort',
|
2015-06-29 10:23:02 +02:00
|
|
|
path: '../dist/tablefilter/extensions/sort/',
|
2015-06-28 03:56:40 +02:00
|
|
|
types: [
|
|
|
|
'number', 'string', 'string',
|
|
|
|
'US', 'none', 'string'
|
|
|
|
]
|
2015-06-28 04:03:07 +02:00
|
|
|
},
|
2015-06-29 10:23:02 +02:00
|
|
|
{
|
|
|
|
name: 'colsVisibility',
|
|
|
|
path: '../dist/tablefilter/extensions/colsVisibility/'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'filtersVisibility',
|
|
|
|
path: '../dist/tablefilter/extensions/filtersVisibility/'
|
|
|
|
}
|
2015-06-28 03:56:40 +02:00
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
tf = new TableFilter('demo', tfConfig);
|
|
|
|
tf.init();
|
|
|
|
}
|
|
|
|
);
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<!-- @import partials/pre-inline-script.html -->
|
|
|
|
</body>
|
|
|
|
</html>
|