| Project: | AdaptiveTheme |
| Version: | 7.x-3.x-dev |
| Component: | CSS/HTML |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Not sure, if this is really an issue with media gallery and/or Adaptive Theme. But maybe someone, who is using Adaptive Theme, could need this solution.
The possibility to drag and drop images inside a gallery of media-gallery is not working with Adaptive Theme. It looks like, that the css-path is a bit different.
If you go to /sites/all/modules/media_gallery inside media_gallery.dragdrop.js at line 18, you can find the search path for "field-items".
I just changed this line to the following one, to make drag and drop working with Adaptive Theme:
var $gallery = $('body.page-node #block-system-main .node-media-gallery .media-gallery-media > .field-items, body.page-type-media-gallery #block-system-main article .media-gallery-media > .field-items').once('media-gallery-sortable');
So I just added another search path.
Comments
#1
Hi
Similar issue for me. This seems to from the specific implementation of theme_field in template.theme.inc in
function adaptivetheme_field($vars)Adding back the initial code in that function fixes that problem
// Render the items.$output .= '<div class="field-items"' . $variables['content_attributes'] . '>';
foreach ($vars['items'] as $delta => $item) {
$classes = 'field-item ' . ($delta % 2 ? 'odd' : 'even');
$output .= '<div class="' . $classes . '"' . $vars['item_attributes'][$delta] . '>' . drupal_render($item) . '</div>';
}
$output .= '</div>';
Though I don't know the side effect of it
Laurent
Agence Web Coheractio
#2
It should have no side affect - that is what I will do for the next release, I only removed it to have less code, however since this is causing a problem with Media Module I will restore the default.
#3
subscribe - replace the code like in #1 fixed for me.
#4
Had the same issue on individual gallery pages. #1 worked well for me. The main gallery page, however, has changed (since changing to an AT theme, not since implementing #1). The galleries no longer show as thumbnails in columns and rows, but large thumbs the whole width of the page (see screenshot).
Played with the css which reduces the size of the thumbs, but they still appear one per line, not inline. Can anyone figure out why? (not sure if this should have its own issue..)
#5
Subscribe
#6
@sdk, please use the new "follow" button in the top right instead of using subscribe comments. Thanks
#7
With Adaptive Theme 7.x-2.1, same problems seem to remain; trick #1 does not work for me ($variables is undefined), and #4 (large thumbs the whole width of the main gallery page) is still an issue.
#8
GN - switch $variables to $vars
Or use the DEV version of this theme, its perfectly stable and has a number of other fixes as well. I am going to release a new version quite soon, as soon as I get a bug and feature audit completed - aka, when I have some time :)
#9
Thank you Jeff.
Per se, 7.x-2.x-dev of 2011-Dec-11 does not restore the missing drag-n-drop handles, but it works after I edit var $gallery in media_gallery.dragdrop.js as suggested by MasterEmit;
actually, the handle is not seen for the base Adaptivetheme, but it does work for Pixture_reloaded (which is Adaptivetheme-based).
#10
Interesting, I will need to test this out (I havent actually tested it at all due to time), what should be in the DEV repo is basically the default theme_field with a minor change for labels only, as per #1.
#11
This shouldn't be an issue now, theme_field is producing pretty standard markup and Media Module should handle it OK.