Skip to content

Commit

Permalink
Merge pull request neos#1401 from aertmann/media-browser-selection
Browse files Browse the repository at this point in the history
BUGFIX: Selecting image in media browser thumbnail view
  • Loading branch information
kdambekalns authored Jan 26, 2017
2 parents e3da050 + 4571d2c commit 83c2a59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
}">
<f:for each="{paginatedAssets}" as="asset">
<li class="asset">
<f:link.action action="edit" class="neos-thumbnail" arguments="{asset: asset}">
<div class="neos-img-container draggable-asset {f:if(condition: '{asset.tags -> f:count()} == 0', then: ' neos-media-untagged')}" data-asset-identifier="{asset -> f:format.identifier()}">
<f:link.action action="edit" class="neos-thumbnail" arguments="{asset: asset}" data="{asset-identifier: '{asset -> f:format.identifier()}'}">
<div class="neos-img-container draggable-asset {f:if(condition: '{asset.tags -> f:count()} == 0', then: ' neos-media-untagged')}">
<m:thumbnail asset="{asset}" preset="Neos.Media.Browser:Thumbnail" alt="{asset.label}" async="{settings.asyncThumbnails}" />
</div>
</f:link.action>
Expand Down
4 changes: 2 additions & 2 deletions Neos.Media.Browser/Resources/Public/JavaScript/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@
if (window.parent !== window && window.parent.NeosMediaBrowserCallbacks) {
// we are inside iframe
$('.asset-list').on('click', '[data-asset-identifier]', function(e) {
if ($(e.target).closest('a, button').length === 0) {
if(window.parent.NeosMediaBrowserCallbacks && typeof window.parent.NeosMediaBrowserCallbacks.assetChosen === 'function') {
if ($(e.target).closest('a, button').not('[data-asset-identifier]').length === 0) {
if (window.parent.NeosMediaBrowserCallbacks && typeof window.parent.NeosMediaBrowserCallbacks.assetChosen === 'function') {
window.parent.NeosMediaBrowserCallbacks.assetChosen($(this).attr('data-asset-identifier'));
}
e.preventDefault();
Expand Down

0 comments on commit 83c2a59

Please sign in to comment.