I created a cell on each row that has a dropdown w/ move, duplicate, delete, and upload document. When I click upload document everything works correctly and the document is stored, etc. However, after I upload a document and click 'Save', if I turn around and click the 'New' button created by TableTools, I believe, it actually shows the upload dialog instead of all the columns needed for a new entry. If I refresh and click 'New' it loads the new entry modal perfectly and works. Below is the code to just show the document upload field for when the dropdown action 'upload' is clicked.
chargesTable.on( 'click', '.editor_upload', function (e) {
e.preventDefault();
editor
.hide()
.show('charges.documentId')
.title( 'Upload Document' )
.buttons({
label: 'Save',
fn: function () {
this.submit();
}
})
.message('<div class="upload-message">For security reasons, PDF is only allowed to be uploaded.</div>')
.edit($(this).closest('tr')[0]);
});