Active
Project:
Popups API (Ajax Dialogs) [D7]
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Jun 2009 at 10:50 UTC
Updated:
14 Feb 2012 at 13:04 UTC
Not sure if I've got something set up wrong, but I'm using hook_popups to add popups to links, and have set a content selector so the content area gets refreshed by ajax.
Code that has the problem
/*
* Implementation of hook_popups
*/
function saw_module_popups() {
return array(
'admin/staff/hours' => array(
'#content-content .view-data-edit-node a' => array(
),
'#content-content .inner .month.day a' => array(
)
),
);
}
Everything works fine at first, but after the first page refresh the popup links are no longer processed. I'm using force refresh on the page to get it working for the moment, but would be nice to have it just the content area reloaded by ajax, with the popups still working.
Here's the code I'm currently using to do the page refresh
/*
* Implementation of hook_popups
*/
function saw_module_popups() {
return array(
'admin/staff/hours' => array(
'#content-content .view-data-edit-node a' => array(
'updateMethod' => 'reload',
),
'#content-content .inner .month.day a' => array(
'updateMethod' => 'reload',
)
),
);
}
And this is on a calendar View if that makes any difference.
Great module btw. Thanks,
Mark
Comments
Comment #1
boabjohn commentedI think we may have a similar problem.
The pop-up is being used to allow edits on one content type while we are editing a different content type. For example, we have Parent content type, and several child types, one of which is called Risk.
1. We're in edit mode on the Parent node and the user is making edits in parent node fields...
2. in the same session, without submitting, user launch a pop-up to edit child (Risks) content
3. On submit of the child changes, we return to the parent node, and our existing session changes are still held in state.
4. If we hit save on the Parent node now, both the parent node changes and the child changes are saved. No problems.
5. BUT if, after saving the change in the Risk popup, user sees that more edits are needed, and choose to edit again (or edit any other Risk item), we don't get the popup...we go straight to the Risk item's edit mode
This dumps the parent node's edit state, losing all the users current edits in the Parent node.
Not good.
What to do?
Comment #2
starbow commentedHmm. What you describe should work. I wonder why more people aren't reporting the same problem.
Comment #3
hefox commentedI had a similair issue, my workaround was sending the ajax for settings manually inside a
for the page.Comment #4
teachdrupal commentedI faced the same issue.
popups module displays the child node, and if user edit the text field and save the node, it is n't refreshing the node (popup window).
Comment #5
mehtatejas commentedHi,
I am facing the same issue. After ajax view refresh pop is not working.
Please help.
Comment #6
serjas commentedsame problem here
Comment #7
srahul07 commentedHi,
I have set up popups for my website. I have link on my webpage on clicking which I get the details of the content in a new popup window. The popup is having data which comes from the view with the pager set to 5. After 5 items it shows the pager and shows next 5 items when I click on "Next" button. With each item I have a Submit button which I am using to add item to the cart. If I am on the first page in the popups, and have not yet clicked on the "Next" or "Prev" or any of the pager numbers and click on the Submit button, it does open the next page in popup itself from where I close the popup using java script and redirect to my cart page.
But if I click on any of the pager links on popup and then click on Submit button in any of the item, the pop-up closes automatically and stays on the page having javascript to redirect to cart page, which is suppose to be shown in popup.
I am not getting why is this happening?
Comment #8
srahul07 commentedFound the issue. The popup module has beforeSubmit and beforeSend functions which changes the behaviour of the form elements. Hence whenever the popup opens, the beforeSubmit function search for all the form elements and changes the behavior of Submit button, hence when user clicks on submit button it automatically loads the second page in popups.
Same should happen when I click on the pager in popup, it does not. Since, the beforeSubmit and beforeSend functions changes the behavior of the form element on popup load and when I click on pager in popup the popup is already open hence, it does not change the behavior of form elements.
Solution will be to trigger the java script which will change the behavior as per the beforeSubmit. But how do I trigger this script?