qol: attachments newest to oldest and adjustments so attachments are shown

This commit is contained in:
Gary Sharp
2024-12-18 20:09:10 +11:00
parent 7550e0e45d
commit 39ba206831
20 changed files with 81 additions and 85 deletions
@@ -27,7 +27,7 @@
<div class="attachmentOutput">
@if (Model.Device.DeviceAttachments != null)
{
foreach (var da in Model.Device.DeviceAttachments)
foreach (var da in Model.Device.DeviceAttachments.OrderByDescending(a => a.Id))
{
<a href="@Url.Action(MVC.API.Device.AttachmentDownload(da.Id))" data-attachmentid="@da.Id" data-mimetype="@da.MimeType">
<span class="icon" title="@da.Filename">
@@ -159,7 +159,7 @@
e.find('.remove').click(removeAttachment);
if (!quick)
e.hide();
$attachmentOutput.append(e);
$attachmentOutput.prepend(e);
onUpdate();
if (!quick)
e.show('slow');