I have need of Context integration in the form of a Context Reaction that adds the Masonry JS to a defined container with a set of defined items.

Patch attached in comment #1

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Deciphered’s picture

Status: Active » Needs review
FileSize
5.43 KB
BWPanda’s picture

Title: Context integration. » Context integration
FileSize
5.65 KB

Thanks for the patch!

I made a few tweaks (to bring this code in line with the other Masonry code as well as some formatting changes). If you can confirm this still works and I haven't broken anything, I'll commit it.

Deciphered’s picture

Can I ask for an interdiff if it's not to much? Help me eyeball the changes.

BWPanda’s picture

Here you go.

The two main changes were moving the context_reaction_masonry.inc file out of the 'plugins' directory (it seems silly having a separate directory for only one file, and masonry_views doesn't put its plugin file in a 'plugins' directory), and indenting the javascript code for readability. These changes are what I was hoping didn't break anything.

Because I moved the plugin file, the interdiff didn't show its inner changes. I therefore hacked the interdiff to show the diff of yours and my context_reaction_masonry.inc files.
So don't try applying the interdiff to anything, it won't work :)

BWPanda’s picture

Oops, just realised that I forgot to update the .info file after removing the plugins directory. Here's an updated patch.

Deciphered’s picture

Status: Needs review » Reviewed & tested by the community

Appears to still work fine, I'm not going to nitpick your changes because in the end it's your module and it works, so marking as RTBC.

BWPanda’s picture

Status: Reviewed & tested by the community » Fixed

Patch from #5 committed: http://drupalcode.org/project/masonry.git/commit/2430f6f

Wouldn't mind hearing your nitpicks, if only to learn what I should/shouldn't be doing in future...

Status: Fixed » Closed (fixed)

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