attachments: Use data-attachment-id to refer to attachments.

This may fix an issue with the delete button not actually sending the
right data to the server; I'm not sure.  Extracted from a patch by
Aastha Gupta.
This commit is contained in:
Tim Abbott
2018-05-04 15:40:28 -07:00
parent 956bd74905
commit 02ad498aa2
2 changed files with 2 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ function render_attachments_ui(attachments) {
$('#uploaded_files_table').on('click', '.remove-attachment', function (e) {
var row = $(e.target).closest(".uploaded_file_row");
row.remove();
delete_attachments($(this).data('attachment'));
delete_attachments($(this).attr('data-attachment-id'));
});
}