mirror of https://github.com/gophish/gophish
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
parent
0bdc4a751d
commit
964ce6f152
|
@ -93,6 +93,7 @@ function load(){
|
||||||
if (pages.length > 0){
|
if (pages.length > 0){
|
||||||
$("#pagesTable").show()
|
$("#pagesTable").show()
|
||||||
pagesTable = $("#pagesTable").DataTable({
|
pagesTable = $("#pagesTable").DataTable({
|
||||||
|
destroy: true,
|
||||||
columnDefs: [
|
columnDefs: [
|
||||||
{ orderable: false, targets: "no-sort" }
|
{ orderable: false, targets: "no-sort" }
|
||||||
]
|
]
|
||||||
|
|
|
@ -182,6 +182,7 @@ function load(){
|
||||||
if (templates.length > 0){
|
if (templates.length > 0){
|
||||||
$("#templateTable").show()
|
$("#templateTable").show()
|
||||||
templateTable = $("#templateTable").DataTable({
|
templateTable = $("#templateTable").DataTable({
|
||||||
|
destroy: true,
|
||||||
columnDefs: [
|
columnDefs: [
|
||||||
{ orderable: false, targets: "no-sort" }
|
{ orderable: false, targets: "no-sort" }
|
||||||
]
|
]
|
||||||
|
|
|
@ -125,6 +125,7 @@ function load(){
|
||||||
$("#emptyMessage").hide()
|
$("#emptyMessage").hide()
|
||||||
$("#groupTable").show()
|
$("#groupTable").show()
|
||||||
groupTable = $("#groupTable").DataTable({
|
groupTable = $("#groupTable").DataTable({
|
||||||
|
destroy: true,
|
||||||
columnDefs: [
|
columnDefs: [
|
||||||
{ orderable: false, targets: "no-sort" }
|
{ orderable: false, targets: "no-sort" }
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue