Change default page length to 25 and save state in DataTables tables

This commit is contained in:
Eric A. Miller
2014-06-08 22:54:34 -04:00
parent f00ebf9ecc
commit 16c52fa8a6
25 changed files with 50 additions and 4 deletions

View File

@@ -18,6 +18,8 @@
$(document).ready(function() {
var table = $('#ds-data-table').dataTable({
"deferRender": true,
"stateSave": true,
"pageLength": 25,
"data": [% results %],
"columns": [{
"data": 'ip',

View File

@@ -177,6 +177,8 @@ $(document).ready(function() {
{ "visible": false, "targets": 0 }
],
"order": [[ 0, 'asc' ]],
"stateSave": true,
"pageLength": 25,
"drawCallback": function ( settings ) {
var api = this.api();
var rows = api.rows( {page:'current'} ).nodes();

View File

@@ -146,6 +146,8 @@ $(document).ready(function() {
{ "visible": false, "targets": 0 }
],
"order": [[ 0, 'asc' ]],
"stateSave": true,
"pageLength": 25,
"drawCallback": function ( settings ) {
var api = this.api();
var rows = api.rows( {page:'current'} ).nodes();

View File

@@ -13,6 +13,8 @@
$(document).ready(function() {
var table = $('#ps-data-table').dataTable({
"deferRender": true,
"stateSave": true,
"pageLength": 25,
"data": [% results %],
"columns": [{
"data": 'name',

View File

@@ -15,6 +15,8 @@
$(document).ready(function() {
var table = $('#vs-data-table').dataTable({
"deferRender": true,
"stateSave": true,
"pageLength": 25,
"data": [% results %],
"columns": [{
"data": 'vlans.vlan',