-
Bug
-
Resolution: Fixed
-
High
-
None
Changed from new feature to bug- Original text of description:
We would like the ability to set attachment macro's column width. Currently "name" column is too short. It doesn't display medium-sized file names very well.
It will be very helpful to provide a way to limit the "comment" column' width too.
This presents a usability problem with larger filenames. We probably shorted filenames in this way in the past because of the absence of browser support for the css3 property: text-overflow.
Most modern browsers now support this property.
Fix
There are 2 modules affected by this bug. The attachments macro and the view attachments page (Tools > Attachments).
To fix the attachments macro, download the version 3.6.7 or newer from the Atlassian Marketplace.
For most users, that fix should be sufficient and you can stop here. If, however, you also need to fix the view attachments page, you'll have to edit confluence/includes/css/attachments.css and add the following CSS code:
#viewAttachmentsDiv table.attachments { border-bottom: 1px solid #ccc; table-layout: fixed; } table.attachments .filename-column { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } @media screen and (min-width: 1600px) { table.attachments th.filesize-column { width: 80px; } table.attachments th.filedate-column { width: 180px; } table.attachments th.filecreator-column { width: 180px; } table.attachments th.comment, table.attachments th.labels { width: 200px; } table.attachments th.actions-column { width: 180px; } }
You will need to delete confluence/includes/css/attachments-min.css for these changes to take effect.
Then edit confluence/pages/includes/attachments-table.vm and change:
<th>#sortLink("size", "${sortPathPrefixHtml}size" $action.getText('file.size'))</th> <th>$action.getText('creator.name')</th> <th>#sortLink("createddate" "${sortPathPrefixHtml}createddate" $action.getText('columnheading.creation.date'))</th>
to this:
<th class="filesize-column">#sortLink("size", "${sortPathPrefixHtml}size" $action.getText('file.size'))</th> <th class="filecreator-column">$action.getText('creator.name')</th> <th class="filedate-column">#sortLink("createddate" "${sortPathPrefixHtml}createddate" $action.getText('columnheading.creation.date'))</th>
and this:
#if ($showActions == "true") <th> </th> #end
to this:
#if ($showActions == "true") <th class="actions-column"> </th> #end
Finally (and most importantly), change this:
$generalUtil.htmlEncode($generalUtil.shortenString($attachment.fileName, 35))
to this:
$generalUtil.htmlEncode($attachment.fileName)
- causes
-
CONFSERVER-30112 Actions column in page attachments view overflows when actions are added by plugin points
- Closed
-
CONFSERVER-30152 Some system attachment actions not visible on Tools->Attachments page
- Closed
-
CONFSERVER-30659 Resizing the sidebar can cause filenames to disappear on attachment pages
- Closed
-
CONFSERVER-31580 Attachment name display too short
- Closed
- has a regression in
-
CONFSERVER-32209 Only a small fragment of long attachment filenames are rendered on Tools->Attachments page
- Closed
-
CONFSERVER-36326 Only a small fragment of long attachment filenames are rendered on Tools->Attachments page
- Closed
- is duplicated by
-
CONFSERVER-31375 Try to avoid truncating the filename of the attachment where possible
- Closed
-
CONFSERVER-25689 Make the attachment macro more configurable to display longer file names
- Closed
-
CONFSERVER-28498 Attachments name are truncated in the attachment's screen
- Closed
-
CONFSERVER-31715 Attachement macro should display long file names properly
- Closed
- is related to
-
CONFSERVER-13729 The Attachments macro should be able to select the columns that should be shown.
- Closed
-
CONFSERVER-22739 Enhance the attachment macro to allow authors to exclude or include specific columns from output
- Closed
-
CONFSERVER-31715 Attachement macro should display long file names properly
- Closed
-
CONFSERVER-33486 Attachment action links on Tools->Attachments page are all bunched together
- Closed
- relates to
-
CSP-97752 Loading...