Posted by kscheirer on July 21, 2009 at 7:05pm
Jump to:
| Project: | Popups API (Ajax Dialogs) |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
When using the popup Stack, I would like to have a new popup take over and be the only popup, either by deleting all other popups or by replacing the content of the existing popup.
I think this may already be possible with creative use of an updateMethod = callback and having the callback go through and call a close function on each existing other popups. Any advice towards this would be appreciated :)
Comments
#1
You can add Popups.close(); in popup.js when it calls the push function. This way everytime a new pop up is called it will close the already open ones. See the piece of code below.
I have added popups.close() just before the push method.
/**
* Manage the page wide popupStack.
*/
Popups.push = function(popup) {
Popups.close(); // inserted this line of code
Popups.popupStack.push(popup);
};
I am very new to drupal and have not tested this for any further issues that might arise coz of this. It worked out well for me.
#2
That seems to kill the overlay? I'm running IE and applied the patch to close the overlay, that might have something to do with it.