Use custom portsort plug-in on port columns within DataTables not using server-side processing

This commit is contained in:
Eric A. Miller
2014-08-12 21:51:26 -04:00
parent 746d500175
commit 7f768b544f
8 changed files with 36 additions and 9 deletions

View File

@@ -29,8 +29,11 @@ $(document).ready(function() {
}
}, {
"data": 'port',
"type": 'portsort',
"render": function(data, type, row, meta) {
return '<a href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(data) + '&c_nodes=on">' + he.encode(data) + '</a>';
return type === 'display' ?
'<a href="[% device_ports %]&q=' + encodeURIComponent(row.ip) + '&f=' + encodeURIComponent(data) + '&c_nodes=on">' + he.encode(data) + '</a>' :
data;
}
}, {
"data": 'description',