Fixed Double Instantiation

When a modal was closed and the data was loaded again it tried to
instantiate the table again, so always destroy the table on load.
pull/87/head
Justin Gray 2016-01-20 20:35:51 -06:00
parent 0bdc4a751d
commit 964ce6f152
3 changed files with 3 additions and 0 deletions

View File

@ -93,6 +93,7 @@ function load(){
if (pages.length > 0){
$("#pagesTable").show()
pagesTable = $("#pagesTable").DataTable({
destroy: true,
columnDefs: [
{ orderable: false, targets: "no-sort" }
]

View File

@ -182,6 +182,7 @@ function load(){
if (templates.length > 0){
$("#templateTable").show()
templateTable = $("#templateTable").DataTable({
destroy: true,
columnDefs: [
{ orderable: false, targets: "no-sort" }
]

View File

@ -125,6 +125,7 @@ function load(){
$("#emptyMessage").hide()
$("#groupTable").show()
groupTable = $("#groupTable").DataTable({
destroy: true,
columnDefs: [
{ orderable: false, targets: "no-sort" }
]