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.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | galleries.png | 429.07 KB | Corbey |
Comments
Comment #1
Agence Web CoherActio commentedHi
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
Though I don't know the side effect of it
Laurent
Agence Web Coheractio
Comment #2
Jeff Burnz commentedIt 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.
Comment #3
bkosbornesubscribe - replace the code like in #1 fixed for me.
Comment #4
Corbey commentedHad 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..)
Comment #5
sdk commentedSubscribe
Comment #6
bkosborne@sdk, please use the new "follow" button in the top right instead of using subscribe comments. Thanks
Comment #7
GN commentedWith 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.
Comment #8
Jeff Burnz commentedGN - 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 :)
Comment #9
GN commentedThank 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).
Comment #10
Jeff Burnz commentedInteresting, 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.
Comment #11
Jeff Burnz commentedThis shouldn't be an issue now, theme_field is producing pretty standard markup and Media Module should handle it OK.
Comment #12
miksha commentedI had media gallery layout issues (like in #4) with AT Commerce adaptive theme, and fixed it with info from here: http://drupal.org/node/1230090 (post #12) Drag and drop still doesn't work.
Comment #13
Jeff Burnz commentedI can install and test with media module and media gallery, although I have limited time, can someone link to a live site with this running with AT?
Comment #14
Jeff Burnz commented#12 is wrong, Drag and drop works fine. Just installed, set up media gallery, added pictures, dragged them into the right order and watched in a slideshow in a lightbox, worked flawlessly in AT 7.x-3.x.
Comment #15
caspercash commentedhi! i am sorry for opening this thread but I had a problem in the gallery collection (All galleries with thumbnails of each individual gallery). The drag and drop really doesn't work. But it works fine in the individual gallery where the list of media is displayed. I am using a custom theme where AdaptiveTheme (7.x-2.3) is the base theme. I am also using the media gallery version 7.x-1.0-beta8.
Comment #16
miksha commented#15 is probably wrong as I was in #12, because the issue we're having is considering version 2.x and not 3.x-dev to which this thread belongs. In 3.x drag and drop works just fine, as opposed to 2.x version of this theme. I've been evaluating both version of this theme and made a mistake of posting here.
Comment #17
Jeff Burnz commentedOK, so this is a 2.x version issue - thanks guys for pin pointing this.
Comment #18
caspercash commentedI am so sorry to post here again but i just wanted you to know that I've been using ATheme 7.x-3.x, Media Gallery 7.x-1.0-beta8 and Media 7.x-1.2. The drag n drop works only for the first time you reorder the galleries and when you reorder again, the drag n drop doesn't let you drag the gallery. I still don't know what went wrong. I am scratching my head back tracing where it went wrong. By the way, before, I used ATheme 7.x-2.x as the base theme but then this thread mentioned that it works with 7.x-3.x so I updated it to 7.x-3.x and the drag n drop works great. But now it isn't anymore. I am still on the process of tracing my tracks. Anyway, thanks for this great theme!
Comment #19
Jeff Burnz commentedThis is a really old issue and I am going to close this as a wont fix - it works on 7.x-3.x which has by far the most users of any version of AT.
@caspercash - what you describe sounds like a JavaScript issue, maybe try asking in the Media Gallery queue, I could not reproduce I'm afraid, it all works very well for me, great module actually!