Currently, only elements with the #type "submit" are displayed in the "Operations" column of theme_media_widget_multiple. Other buttons included with the media_generic widget like Edit, Browse, Preview, and Attach are "link" elements, but should also be displayed in the "Operations" column. This patch makes sure that all link and submit elements are placed in the "Operations" column in theme_media_widget_multiple.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

samuel.mortenson’s picture

Status: Active » Needs review
FileSize
672 bytes
Devin Carlson’s picture

Status: Needs review » Fixed

Thanks for the patch!

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

jurgenhaas’s picture

Status: Fixed » Active

This patch unfortunately breaks other functionality, e.g. the project epsacrop. They are looking for the class "media-widget" and within that context they then try to find crop buttons. But with this change the crop button moves out to a different context and then their functionality doesn't work anymore.

jurgenhaas’s picture

What is going to happen about this issue? We got hit by this problem again because of the media 2.x-beta1 upgrade.

samuel.mortenson’s picture

I would recommend opening an issue with epsacrop, it sounds like this could be fixed by a few changes to their JS selectors. As far as I know no other projects have been affected by this change.

jurgenhaas’s picture

Fair point and it appears there is already a patch for it, see #2506721: Manage image crops button not working with unlimited media fields

samuel.mortenson’s picture

Status: Active » Fixed

I'm glad the solution was already out there. :-) I'll mark this issue as Fixed, if anyone else has problems feel free to re-open it.

Status: Fixed » Closed (fixed)

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