In the Media Browser under the "Library" tab, images are displayed at specified dimensions with the filename on layered top. Documents, however, are displayed as a link (also with the filename layered on top) and aren't limited to the same dimensions, ie. the link can extend outside.

Here's a screenshot:

While it's debatable if the preview for the document should even be a link, at the very least, that link (or anything else that could appear in the preview) shouldn't be able to extend outside of that box!

I'll post a patch to fix in a moment...

Original issue summary

Hi,

Just wondering, is the attached screen shot really the correct display for documents (word,pdf etc). The old style full sized icon to match image thumbnail dimensions was much more tidy and long filenames now make the layout extremely messy as they aren't being truncated.

Or has something not taken correctly when I've done the update?

Thanks

Dave

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dsnopek’s picture

Title: Doc display in Library » Document names in Library aren't limited to the same dimensions as images
Issue summary: View changes
Issue tags: -display +panopoly
FileSize
29.55 KB
dsnopek’s picture

Status: Active » Needs review
FileSize
293 bytes

Here is a patch to fix! Please let me know what you think. :-)

We're likely to start using this in Panopoly soon-ish.

Devin Carlson’s picture

Component: Media WYSIWYG » Media Browser
FileSize
1.79 KB

@ritey, you're correct documents should be displayed using the 'Large filetype icon' formatter when viewed using the 'preview' view mode.

This is just a weight conflict between the default display configuration provided by Media vs. the one provided by File Entity. The attached patch adjusts the display weights so that they'll take precedence.

Devin Carlson’s picture

Status: Needs review » Fixed

Tested #3 and committed to Media 7.x-2.x.

  • Devin Carlson committed 64c5102 on 7.x-2.x
    Issue #2421589 by dsnopek, Devin Carlson: Document names in Library aren...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

dsnopek’s picture

@Devin Carlson: Thanks! That's actually a more elegant fix than just hiding the link overflow. :-)