As the title describes, I now have 2 megarow blocks on the users profile page. But on my latest block, the colspan was incorrect. Resulting in a poorly displayed table.
After some digging I found out this part of the DOM was JS generated. On opening of the magarow it selects the parent table wrongly by use of $(".views-table"). This scope is perfectly ok on megarow page displays but on pages where possibly more instances are rendered it always selects the first table it has found.
I solved this for my problem by passing the event target from the clickAjaxLink to the open function as illustrated in my patch. Now the open function looks for the .views-table object relative to the event target.
This is far from a production tested solution, use with caution!
Comment | File | Size | Author |
---|---|---|---|
multiple-views-fix.patch | 1.62 KB | joostpluijmers |
Comments
Comment #0.0
joostpluijmers CreditAttribution: joostpluijmers commentedTypos
Comment #1
brandon_beeler CreditAttribution: brandon_beeler commentedThis issue occurs any time there are other instances of any views-table on a single page. Updated the title to reflect that.
Comment #2
brandon_beeler CreditAttribution: brandon_beeler commentedBy the way this patch worked for me.
Comment #3
ArtusamakOK thanks for the heads-up, i pushed a more complex version of this patch (http://drupalcode.org/project/views_megarow.git/commit/e92950a4de3501eb8...) to support multi views megarow with identical entity IDs.
I invite you to retest and report feedback if something is wrong.
Comment #4
joostpluijmers CreditAttribution: joostpluijmers commentedLooks great! Working fine now.