DataTables need distinct id's on pages with multiple tabs

This commit is contained in:
Eric A. Miller
2014-06-03 20:23:19 -04:00
parent 3ce40b1191
commit bf477d5890
3 changed files with 6 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0"> <table id="ds-data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th>Device</th> <th>Device</th>
@@ -16,7 +16,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
var table = $('#data-table').dataTable({ var table = $('#ds-data-table').dataTable({
"deferRender": true, "deferRender": true,
"data": [% results %], "data": [% results %],
"columns": [{ "columns": [{

View File

@@ -1,4 +1,4 @@
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0"> <table id="ps-data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
@@ -11,7 +11,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
var table = $('#data-table').dataTable({ var table = $('#ps-data-table').dataTable({
"deferRender": true, "deferRender": true,
"data": [% results %], "data": [% results %],
"columns": [{ "columns": [{

View File

@@ -1,4 +1,4 @@
<table id="data-table" class="table table-striped table-bordered" width="100%" cellspacing="0"> <table id="vs-data-table" class="table table-striped table-bordered" width="100%" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th>Vlan</th> <th>Vlan</th>
@@ -13,7 +13,7 @@
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
var table = $('#data-table').dataTable({ var table = $('#vs-data-table').dataTable({
"deferRender": true, "deferRender": true,
"data": [% results %], "data": [% results %],
"columns": [{ "columns": [{