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.

CommentFileSizeAuthor
#4 galleries.png429.07 KBCorbey

Comments

Agence Web CoherActio’s picture

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

Jeff Burnz’s picture

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.

bkosborne’s picture

subscribe - replace the code like in #1 fixed for me.

Corbey’s picture

StatusFileSize
new429.07 KB

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..)

sdk’s picture

Subscribe

bkosborne’s picture

@sdk, please use the new "follow" button in the top right instead of using subscribe comments. Thanks

GN’s picture

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.

Jeff Burnz’s picture

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 :)

GN’s picture

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).

Jeff Burnz’s picture

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.

Jeff Burnz’s picture

Version: 7.x-1.x-dev » 7.x-3.x-dev
Component: Code » CSS/HTML
Status: Active » Closed (fixed)

This shouldn't be an issue now, theme_field is producing pretty standard markup and Media Module should handle it OK.

miksha’s picture

I 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.

Jeff Burnz’s picture

Status: Closed (fixed) » Active

I 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?

Jeff Burnz’s picture

Status: Active » Closed (fixed)

#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.

caspercash’s picture

Status: Closed (fixed) » Active

hi! 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.

miksha’s picture

#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.

Jeff Burnz’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev

OK, so this is a 2.x version issue - thanks guys for pin pointing this.

caspercash’s picture

I 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!

Jeff Burnz’s picture

Status: Active » Closed (won't fix)

This 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!