WIP framework's popup storage/restore:

- Keep tracking of popup's window object and restore it when needed
- Implement a method to check an already opened popup and execute a method in the selected popup context
- Fix vcard import into opened compose windows not working
This commit is contained in:
Hadi Nategh
2018-03-09 17:48:09 +01:00
parent 50bfc960a8
commit a8e10cdc64
5 changed files with 221 additions and 138 deletions

View File

@ -270,6 +270,12 @@ egw.extend('utils', egw.MODULE_GLOBAL, function()
*/
storeWindow: function(appname, popup)
{
if (popup.opener) popup.opener.framework.popups_garbage_collector();
if (popup.opener && popup.opener.framework && egw.is_popup(popup)
&& typeof popup.opener.framework.popup_idx(popup) == 'undefined')
{
popup.opener.framework.popups.push(popup);
}
// Don't store if it has no name
if(!popup.name || ['_blank'].indexOf(popup.name) >= 0)
{