mirror of
https://github.com/gophish/gophish
synced 2024-11-15 00:37:14 +00:00
Remove unnecessary code
Removed check and just always destroy and rebuild datatables.
This commit is contained in:
parent
22c2f659e8
commit
0bdc4a751d
1 changed files with 8 additions and 21 deletions
|
@ -112,27 +112,14 @@ 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
|
attachmentsTable = $('#attachmentsTable').DataTable({
|
||||||
if ( $.fn.dataTable.isDataTable('#attachmentsTable') ) {
|
destroy: true,
|
||||||
attachmentsTable = $('#attachmentsTable').DataTable({
|
"order": [[ 1, "asc" ]],
|
||||||
destroy: true,
|
columnDefs: [
|
||||||
"order": [[ 1, "asc" ]],
|
{ orderable: false, targets: "no-sort" },
|
||||||
columnDefs: [
|
{ sClass: "datatable_hidden", targets:[3,4]}
|
||||||
{ orderable: false, targets: "no-sort" },
|
]
|
||||||
{ 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 a new issue