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!

CommentFileSizeAuthor
multiple-views-fix.patch1.62 KBjoostpluijmers
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joostpluijmers’s picture

Issue summary: View changes

Typos

brandon_beeler’s picture

Title: Multiple megarow instances on the same page results in an incorrect colspan » Multiple Views Table instances on the same page results in an incorrect colspan
Issue summary: View changes

This issue occurs any time there are other instances of any views-table on a single page. Updated the title to reflect that.

brandon_beeler’s picture

By the way this patch worked for me.

Artusamak’s picture

Status: Needs review » Fixed

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

joostpluijmers’s picture

Looks great! Working fine now.

Status: Fixed » Closed (fixed)

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