UNPKG

2.18 kBHTMLView Raw
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <title>{NAME} v{VERSION} - Development workflow with RequireJs</title>
5 <!-- @import partials/style.html -->
6</head>
7<body>
8<h1>{NAME} v{VERSION}</h1>
9<h2>Development workflow with RequireJs</h2>
10<p>
11 To take advantage of the RequireJs development workflow use the
12 <code>grunt dev-modules</code> command.
13</p>
14<p>
15 If you use extensions, you will need to specify the extensions path as per
16 configuration example. Sorting feature also requires the third-party
17 <code>../libs/sortabletable</code> dependency to be imported.
18</p>
19
20<!-- @import partials/pre.html -->
21
22<!-- @import partials/countries-by-continent.html -->
23
24<script src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.1.17/require.min.js"></script>
25<script data-config>
26requirejs(
27 ['../dist/tablefilter/tablefilter', '../libs/sortabletable'],
28 function(mod){
29 var TableFilter = mod.TableFilter;
30 var tfConfig = {
31 base_path: '../dist/tablefilter/',
32 col_1: 'multiple',
33 col_2: 'checklist',
34 alternate_rows: true,
35 rows_counter: true,
36 enable_default_theme: true,
37 col_widths: [
38 '70px', '170px', '170px',
39 '110px', '90px', '250px'
40 ],
41 extensions:[
42 {
43 name: 'sort',
44 path: '../dist/tablefilter/extensions/sort/',
45 types: [
46 'number', 'string', 'string',
47 'US', 'none', 'string'
48 ]
49 },
50 {
51 name: 'colsVisibility',
52 path: '../dist/tablefilter/extensions/colsVisibility/'
53 },
54 {
55 name: 'filtersVisibility',
56 path: '../dist/tablefilter/extensions/filtersVisibility/'
57 }
58 ]
59 };
60
61 tf = new TableFilter('demo', tfConfig);
62 tf.init();
63 }
64);
65</script>
66
67<!-- @import partials/pre-inline-script.html -->
68</body>
69</html>