Problem

When clicking on vote widgets to vote up/down, the widget gets wrapped in an additional div. This breaks some styling provided by vud – if the widget is not left-most on a line, it appears on a new line after getting a vote.

Proposed resolution

Rewrite the markup inserted by AJAX to not insert an additional div.

Remaining tasks

Identify the function inserting the markup on voting.
Change the markup.
Verify that the updated markup works well.

CommentFileSizeAuthor
#7 no-wrapper-divs-8870409-7.patch1.86 KBhenrijs.seso

Comments

kingdee40’s picture

I'm having a similar issue, every time a user clicks to vote, the nodes are duplicated.
I have a View with Panel fields display.

kingdee40’s picture

Solved by marking the view distinct, but probably still an issue.

labs’s picture

Did anyone ever look into the original problem (each vote creates a new div around the widget)? I can try to look at this, but I'm a newb. Any pointers appreciated.

itangalo’s picture

As far as I know, noone has looked into the original problem.

A good place to start is to look at the ajax callback that replaces the clickable element. If you look at the vud.module file and the vud_menu() function, there should be something saying what function is called when a vote link is clicked. That function probably has some problems – or possibly how it is called.

Good luck!

labs’s picture

Thanks much. I'll report back if I make any progress.

henrijs.seso’s picture

Issue summary: View changes

ajax_command_replace could be ajax_command_html as _replace wraps all responses in empty div.

We are not alone. Original problem in misc/ajax.js.

henrijs.seso’s picture

Status: Active » Needs review
StatusFileSize
new1.86 KB

Something like this. Added small helper function that strips newlines from rendered widgets.