Override state for hidden params passed through a link

This commit is contained in:
Eric A. Miller
2014-08-10 23:54:13 -04:00
parent d908bf188e
commit 3ea942f6b4

View File

@@ -18,10 +18,14 @@ $(document).ready(function() {
"colVis": { "colVis": {
"exclude": [ 0 ] "exclude": [ 0 ]
}, },
[%# "stateLoadParams": function (settings, data) { "stateLoadParams": function (settings, data) {
var idx = $('#dp-data-table').DataTable().column( 'c_duplex:name' ).index(); var idx = 0;
[% FOREACH key IN params.keys %]
[% NEXT UNLESS key.match('^c_') AND !key.match('^c_neighbors') AND params.$key == 'on' %]
idx = $('#dp-data-table').DataTable().column( '[% key %]:name' ).index();
data.columns[idx].visible = true; data.columns[idx].visible = true;
}, %] [% END %]
},
"columns": [ "columns": [
{ {
"title": '', "title": '',