Last active
August 29, 2015 14:01
-
-
Save woeldiche/209c9fdd209d045cf0d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TN.config.table = TN.config.table || {}; | |
TN.config.table.data = TN.config.table.data || {}; | |
TN.config.table.data['example-table'] = { | |
serverside: false, | |
pipeline: 200, | |
ajaxurl: "src/data/my-subscriptions.json", | |
order: [1, 'asc'], | |
pagingType: 'simple_numbers', | |
processing: true, | |
language: { | |
lengthMenu: 'Display _MENU_ records', | |
paginate: { | |
first: 'First', | |
last: 'Last', | |
next: 'Next', | |
previous: 'Previous' | |
} | |
}, | |
info: false, | |
columns: [ | |
{ | |
"name": "", | |
"data": "checkbox", | |
"orderable": false, | |
"class": "col--compact form-checkbox form-checkbox--single", | |
"render": function (data, type, row) { | |
return '<input data-action="select.row" type="checkbox" id="select-' + row.Identifier + '" name="' + row.Identifier + '" /><label for="select-' + row.Identifier + '"><span class="aria--visible">' + row.Identifier + '</span></label>'; | |
} | |
}, | |
{ | |
"name": "Identifier", | |
"data": "Identifier", | |
"render": function (data, type, row) { | |
if (type === 'display') { | |
return '<p>' + row.Identifier + '</p><span class="text--small">' + row.Name + '</span>'; | |
} else { | |
return data; | |
} | |
} | |
}, | |
{ "name": "Name", "data": "Name", "visible": false }, | |
{ "name": "Product", "data": "Product" }, | |
{ "name": "Device model", "data": "Device model" }, | |
{ "name": "Status", "data": "Status" } | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment