mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
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:
@@ -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'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{#with attachment}}
|
||||
<tr class="uploaded_file_row" id="{{name}}">
|
||||
<tr class="uploaded_file_row" id="{{name}}" data-attachment-id="{{id}}">
|
||||
<td>
|
||||
<a type="submit" href="/user_uploads/{{path_id}}" target="_blank" title="{{t 'View file' }}">
|
||||
{{ name }}
|
||||
|
||||
Reference in New Issue
Block a user