Active
Project:
Popup
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2013 at 17:05 UTC
Updated:
2 Nov 2016 at 21:29 UTC
Jump to comment: Most recent
Can someone tell me how I can make one popup close before I open the next one , on the same page?
thanks,
Diana
Comments
Comment #1
dianacastillo commentedI solved this by assigning a global variable to the active popup and closing it when another is click upon.
Comment #2
roman_iglin commentedI came with the same problem how to make it, it is possible in more detail?
thanks,
Romeo
Comment #3
reych9 commentedI would like to close the popup if I click out of it, except if "close" is visible, not just if you click on another popup.
Comment #4
reych9 commentedit is not clear how to do that, could you be more especific?
Comment #5
Scheepers de Bruin commentedIt is possible to provide a new popup effect that does just this. See hook_popup_effects in README.txt
Create a module that implements this hook.
It should return something like the following:
Comment #6
jessinwyoming commentedWould anyone be willing to explain what exactly to add to the popup.js file to make this happen? (I don't know much about javascript.)
Thanks much in advance -
Jessica
Comment #7
jtronchon commentedHi jessinwyoming,
by now you've probably resolved your problem but it could help others...
In order to do the scheepers response in your code, you'll have to create a new module and implement the hook_popup_effects.
For example, you have a module named "my_module".. In your my_module.module, implement this :
"exclusive" is the name of the effect that you have just created so when you want to build the popup, you'll have to specify the 'effect' in $attributes.
Example with a test code that I've created in a form_alter
This code allows me to add a link after an autocomplete field in order to display a view containing several images (with filter). The final purpose (in progress) is to click on an image and add it to my autocomplete field.
I know there is the "references dialog" module but for an unknown reason it doesn't work as planned on my instance.
Cheers.
Comment #8
doxigo commentedYou can manage such thing by jQuery :
Even though I guess this should be an option that users can be able to enable.
Comment #9
alex awg 2015 commentedYou can add to your_theme.js or your_module.js
It close popup after clicking outside its