Closed (duplicate)
Project:
Flag
Version:
5.x-1.0-beta6
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2008 at 11:20 UTC
Updated:
26 Nov 2008 at 09:47 UTC
Thanks for this great module which is really helpful.
I've created a views-block for the bookmark-flags, which I placed in the left column.
But now I have the problem, that this block is not refreshed if a node is flagged and so the newly flagged node does not show up in the block (or is not deleted if unflagged). To see the right block content I have to reload the page.
Is there any chance to refresh the block at the same time when the flag is toggled?
Comments
Comment #1
sirkitree commentedWhile this is definitely possible, the generalized version of the code that it would take to do this across sites would be very difficult to support.
I would suggest that you do this on your site within your own custom javascript.
Comment #2
mooffie commented(A note to ourselves: we should prepare a handbook page explaining how to trigger user javascript code when a Flag ajax response completes. It could be useful. And surely some module exists to refresh a block via ajax.)
Comment #3
sirkitree commentedDo you think this should be part of the "Theming guide"? Or it's own Section alongside? Be glad to start it.
Comment #4
mooffie commentedSirkitree, I'd be elated if you started it. It can be in the "Theming Guide" for the time being, till we have enough howtos to fork a "Miscellaneous recipes" section.
Some food for thought:
- jQuery has an ajaxComplete event (Can we restrict it to a certain flag?).
- In D6 one simply adds "scripts[] = myscript.js" to themename.info.
- To search "ajax block", or just "ajax", in the downloads here.
Comment #5
sirkitree commentedGot it started, very base outline so far http://drupal.org/node/336122
Comment #6
mooffie commentedI'm marking this a duplicate of a new feature:
#338417: Have a "flagSuccess" javascript event
(Sirkitree, could you please delete the page you kindly started? It isn't needed anymore, at least not in its current form. Of course, it could be updated, but until this happens users reading the Guide will get confused.)
Comment #7
sirkitree commentedThe page that I started works to document the current code which is still relevant.
Comment #8
mooffie commentedSirkitree, can you demonstrate how that page is in any way helpful?