Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BWPanda’s picture

Status: Active » Closed (duplicate)

Please refer to the discussion here: #1806628: Support Masonry module

kyletaylored’s picture

Status: Closed (duplicate) » Needs review
FileSize
1.01 KB

Use this patch in conjunction with the one here: #1806628: Support Masonry module

BWPanda’s picture

FileSize
570 bytes

Here's an updated patch to match http://drupal.org/node/1806628#comment-6954012

jibran’s picture

Status: Needs review » Reviewed & tested by the community
ydahi’s picture

Both patches work perfectly. Thanks for your efforts.

pierrelord’s picture

Both patches work here too - much appreciated!

BWPanda’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bradallenfisher’s picture

Berliner-dupe’s picture

Dear BWPanda,

I used "Masonry Views" 7.x-1.0 and Masonry API 7.x-2.0 with Infinite Scroll but it dont works. Infinite Scroll is inactive then.

Then i used "Masonry Views" from git (http://drupalcode.org/project/masonry.git/tree/e5b3dff) and Masonry API 7.x-2.x-dev but here i cant activate the Masonry style in Views. I choose "Masonry Grid" and apply then but its automatic "not selected" after "Apply". I cant see in setting, i dont get an error, nothing, I can not choose or activate it.

Is this nomal?

dixon_’s picture

dixon_’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Assigned: Unassigned » dixon_
Status: Closed (fixed) » Needs review
FileSize
322 bytes

I'm re-opening this with a new patch for 7.x-2.x. This patch is slightly more generic and works great with Views Infinite Scroll after applying the new patch at #1806628-44: Support Masonry module.

rteijeiro’s picture

Status: Needs review » Reviewed & tested by the community

Tested #12 patch and #1806628-44: Support Masonry module and now it works like a charm.

lavamind’s picture

Patch in #12 works fine with Masonry 2.x.

As of Masonry 3.1.1, $container.masonry('reload'); needs to become $container.masonry('reloadItems');

Andre-B’s picture

attention if #2022371: Support for Masonry 3.0? get's pulled in please make sure to modify

      $container.bind('change', function() {
        $container.masonry('reload');
      });

to

      $container.bind('change', function() {
        $container.masonry('reloadItems');
      });
bwoods’s picture

If I make this change, scrolling down on the page is fine, but scrolling back up doesn't work - some of the items get stacked on top of each other. I think "reload" is preferable over "reloadItems," at least in my case.

Andre-B’s picture

there is no reload anymore in 3.x see http://masonry.desandro.com/methods.html for reference. that change will only be needed as soon as #2022371: Support for Masonry 3.0? get's pulled in.

bwoods’s picture

Thanks Andre-B. It's working for the most part, but I'm having two issues:

1. Scrolling down, everything is fine. Scrolling up, things get a little wacky.
2. Refreshing the page doesn't seem to give the masonry items enough space, but clearing the site cache does.

This issues may or may not be related to this particular ticket, I may look around to see what others have done, but at least it's working for the most part.

bwoods’s picture

Issue summary: View changes

Updated issue summary.

mailfox’s picture

#12 +1 works!

ydahi’s picture

Just a note as I was scratching my head on this one...

if using masonry-1.x, need to uninstall and 1.x and install 2.x. Drush up won't update automatically.

Both patches work beautifully. Thanks for your efforts.

morleman@gmail.com’s picture

1806628-44 / 1808018-12 like everyone mentioned works well.

simone960’s picture

The patches provided by #12 works perfectly. Thanks!

1) https://drupal.org/comment/7683411#comment-7683411 (#12)
2) https://drupal.org/comment/7683407#comment-7683407 (#44)

Testing environment:

Masonry API - 7.x-2.0
Masonry Views - 7.x-1.0
Drupal - 7.26
Views Infinite Scroll - 7.x-1.1

sjbassett’s picture

I was having issues with the layout after load since the images weren't being added after the change event was fired, the js ignored if the user selected to load images first, so lost the benefit of masonry, the layout would have to be reloaded. I also tried adding a few comments to file itself.

sjbassett’s picture

FileSize
1.09 KB

Missed the last bracket.

pacome’s picture

Thanks a lot !

perfect result with
patch on https://drupal.org/comment/8472445#comment-8472445 (V2 on #24)
+ patch on https://drupal.org/comment/7940483#comment-7940483 (#50)

[edit] : it seems that the javascript used inside the view is not loaded after the first page (ie : slideshows will be loaded on 1st page, not on the next ones..)
it's probably related to those other issues : https://drupal.org/node/2164235 and https://drupal.org/node/2122273

pacome’s picture

hi,
the last two days, I have been searching a lot around the question i described above (field-slideshow doesn't load after first page), but i didn't understand yet what could be a solution, and not even to which module is it related : view-infinite-scroll, masonry or field-slideshow ?
i understand the idea of a callback, to reload some function after a new page is loaded, but i don't how and where to do it..
Can anyone give a hint on that ?
Thanks
P-

dixon_’s picture

Assigned: dixon_ » Unassigned
AaronBauman’s picture

Category: Feature request » Bug report
Status: Reviewed & tested by the community » Needs work

re: #23: patching for one module doesn't make sense.
The generalized approach from patch #12 is better, and will offer support for other modules e.g. views load more pager.

Also, this is probably a bug.
A javascript behavior should respond to dynamic page events.
Otherwise we could just use document.onload

dealancer’s picture

Hm... patch #12 didn't work with Views Load More module.

AaronBauman’s picture

The solution I finally got to work was actually this: #1907272-2: Re-attach behaviors after ajax callback

kopeboy’s picture

Trying to apply patch at #24 I get "Hunk #1 FAILED at 51."

Shouldn't this apply to 7.x-2.x-dev version??

stevenx’s picture

#22 works. thanks

nesta_’s picture

goldlilys’s picture

Following #22 works for me.

Using:

Drupal 7.36
Masonry API 7.x-2.0
Masonry Views 7.x-1.0+0-dev
Views Infinite Scroll 7.x-1.2+1-dev

Thanks.

  • BWPanda committed e5b3dff on 7.x-3.x
    Issue #1808018 by BWPanda, KyleTaylored: Added integration with Views...
Dom.’s picture

Status: Needs work » Fixed

Added as part of new maintainance cleanup.
Dom (new maintainer)

  • Dom. committed 8a3c03a on 7.x-2.x
    Issue #1808018 by sjbassett, dixon_, BWPanda, kyletaylored: Make work...
vensires’s picture

Working scenario
Masonry API 7.x-2.0+1-dev
Masonry Views 7.x-1.0
Views Infinite Scroll 7.x-1.2+1-dev

I also applied the patches from Views Infinite Scroll #72 and from this issue queue patch in comment #24. Specifically for the #24 patch I also had to replace Drupal.settings.infinite_scroll with Drupal.settings.views_infinite_scroll.

ean’s picture

Masonry Views = 7.x-3.0-beta1+1-dev
Masonry = 7.x-3.0-beta1
Views Infinite Scroll 7.x-1.2+1-dev

no worked

ean’s picture

Status: Fixed » Active
Dom.’s picture

Status: Active » Fixed

This is a regression introduced in the fixing of :
#2513922: Nested Views also get Masonry applied to them
Reverting the correction there makes it work again for this one.
Update to the latest masonry_views 3.x (dev currently) to get the latest correction.

Also note that you need to be using Views Infinite Scroll 7.x-1.x-dev branch with patch #73 applied from here:
https://www.drupal.org/node/1806628#comment-10132738

Thanks and sorry for inconvenience.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

cyclone321’s picture

Any News on this ?, I just cannot seem to get it to work, I am using Masonry Views 7.x-3.0-beta1+3-dev and infinite scroll and 7.x-1.1 I applied Patch from #72 and applied script from #75.

-- Edit --

i managed to get it to work by adding a case to the switch statement in views_plugin_pager_infinite_scroll.inc line 30

case 'masonry_views':
$content_selector = 'div.view-content';
$items_selector = '.views-row';
break;

All the other patches where checking for other random plugins, and the default case statement did not run either...

Dom.’s picture

Hi !
Have you try using Views Infinite Scroll 7.x-1.x-dev and applying patch #73 at https://www.drupal.org/node/1806628#comment-10132738 as per what is explained at #41 ?
(also clear cache after changes just in case :) )

waqarit’s picture

patch #73 has solved my problem.