Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#5 | masonry_context-1904972-5.patch | 5.64 KB | BWPanda |
#4 | masonry_context-1904972-2-interdiff.patch | 4.43 KB | BWPanda |
#2 | masonry_context-1904972-2.patch | 5.65 KB | BWPanda |
#1 | masonry_context-1904972-1.patch | 5.43 KB | Deciphered |
Comments
Comment #1
Deciphered CreditAttribution: Deciphered commentedComment #2
BWPanda CreditAttribution: BWPanda commentedThanks 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.
Comment #3
Deciphered CreditAttribution: Deciphered commentedCan I ask for an interdiff if it's not to much? Help me eyeball the changes.
Comment #4
BWPanda CreditAttribution: BWPanda commentedHere 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 :)
Comment #5
BWPanda CreditAttribution: BWPanda commentedOops, just realised that I forgot to update the .info file after removing the plugins directory. Here's an updated patch.
Comment #6
Deciphered CreditAttribution: Deciphered commentedAppears 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.
Comment #7
BWPanda CreditAttribution: BWPanda commentedPatch 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...