hello,
the onclick event to the next photo is not working if you use "file field" instead of "image field" for your gallery
used modules:
- media colorbox (7.x-1.0-rc1)
- media (7.x-2.0-unstable3+41-dev)
- entity (7.x-1.0-rc1+45-dev)
hello,
the onclick event to the next photo is not working if you use "file field" instead of "image field" for your gallery
used modules:
- media colorbox (7.x-1.0-rc1)
- media (7.x-2.0-unstable3+41-dev)
- entity (7.x-1.0-rc1+45-dev)
Comments
Comment #1
kmadel commentedI am using 'file field' and the Colorbox next/prev buttons work for me, but I have not tried to use the onclick event to the next photo. How is that supposed to work, and do you have custom code or just what Colorbox includes?
Comment #2
kmadel commentedThis is not a bug because Media Colorbox will always display an HTML page as the content of the Colorbox overlay, never just an image. The Colorbox click photo functionality only works when just an image, by itself, is loaded in the Colorbox and this will never be the case for Media Colorbox output (at least not unless a new feature is added). The idea is that you may want to display a number of fields that are part of your File entity Image type (like Geolocation or other Exif data). Media Colorbox gives you the flexibility to display whatever fields you may have added to you File entity types (to include the Image type) at the expense of not handling images as standalone images.
This issue could become a feature request for adding formatter settings to tell Media Colorbox to ignore the Colorbox view mode for the Image type and instead display the Image type File entity as just an image. Or add custom JavaScript to wrap the actual image of the view mode output and attach the Colorbox next event to its onclick event.
Comment #3
murzYes, this is feature request, but it is very needed. Can you provide some hack or workaround for this?
Here is example how to do this: http://stackoverflow.com/questions/11515234/how-to-make-colorbox-inline-...
but it isn't work for me, I try to search more.
Comment #4
murzIt works if I add manually in html code adds via firebug to
div.file-imagefunctiononclick='jQuery.colorbox.next()', so for solve this issue we must add onclick event to each image file type.Comment #5
murzQuick ugly hack for solve this issue is to replace in file
media_colorbox.pages.incstringto:
It works for me very well for images.
Comment #6
murzAnd here is workaround for video (youtube) files, for disabling click-to-play on it:
Comment #7
kmadel commentedFixed with rc2 release.
Comment #8
murzThanks for fixing, but in rc2 missed feature "cursor: pointer" on image area, so not each user understand that he can click on image :)