Skip to content

Commit

Permalink
fix: max-width of email attachment filename
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Apr 7, 2024
1 parent 2b76ee4 commit d678571
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions frappe/public/js/frappe/views/communication.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,18 +598,27 @@ frappe.views.CommunicationComposer = class {

get_attachment_row(attachment, checked) {
return $(`<p class="checkbox flex">
<label class="ellipsis" title="${attachment.file_name}">
<label title="${attachment.file_name}" style="max-width: 100%">
<input
type="checkbox"
data-file-name="${attachment.name}"
${checked ? "checked" : ""}>
</input>
<span class="ellipsis">${attachment.file_name}</span>
<span
class="ellipsis"
style="max-width: calc(100% - var(--checkbox-size) - var(--checkbox-right-margin) - var(--padding-xs) - 16px)"
>
${attachment.file_name}
</span>
<a
href="${attachment.file_url}"
target="_blank"
class="btn-link"
style="padding-left: var(--padding-xs)"
>
${frappe.utils.icon("link-url", "sm")}
</a>
</label>
&nbsp;
<a href="${attachment.file_url}" target="_blank" class="btn-linkF">
${frappe.utils.icon("link-url")}
</a>
</p>`);
}

Expand Down

0 comments on commit d678571

Please sign in to comment.