mirror of https://github.com/gophish/gophish
Remove unnecessary code
Removed check and just always destroy and rebuild datatables.pull/87/head
parent
22c2f659e8
commit
0bdc4a751d
|
@ -112,8 +112,6 @@ function edit(idx){
|
||||||
$("#attachmentUpload").unbind('click').click(function(){this.value=null})
|
$("#attachmentUpload").unbind('click').click(function(){this.value=null})
|
||||||
$("#html_editor").ckeditor()
|
$("#html_editor").ckeditor()
|
||||||
$("#attachmentsTable").show()
|
$("#attachmentsTable").show()
|
||||||
attachmentsTable = null
|
|
||||||
if ( $.fn.dataTable.isDataTable('#attachmentsTable') ) {
|
|
||||||
attachmentsTable = $('#attachmentsTable').DataTable({
|
attachmentsTable = $('#attachmentsTable').DataTable({
|
||||||
destroy: true,
|
destroy: true,
|
||||||
"order": [[ 1, "asc" ]],
|
"order": [[ 1, "asc" ]],
|
||||||
|
@ -122,17 +120,6 @@ function edit(idx){
|
||||||
{ sClass: "datatable_hidden", targets:[3,4]}
|
{ sClass: "datatable_hidden", targets:[3,4]}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
}
|
|
||||||
else {
|
|
||||||
attachmentsTable = $("#attachmentsTable").DataTable({
|
|
||||||
destroy: true,
|
|
||||||
"order": [[ 1, "asc" ]],
|
|
||||||
columnDefs: [
|
|
||||||
{ orderable: false, targets: "no-sort" },
|
|
||||||
{ sClass: "datatable_hidden", targets:[3,4]}
|
|
||||||
]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var template = {attachments:[]}
|
var template = {attachments:[]}
|
||||||
if (idx != -1) {
|
if (idx != -1) {
|
||||||
template = templates[idx]
|
template = templates[idx]
|
||||||
|
|
Loading…
Reference in New Issue