mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-16 03:34:48 +02:00
Send info to open popups to inform user that main window has been reloaded.
This commit is contained in:
@ -70,6 +70,7 @@ window.fw_base = (function(){ "use strict"; return Class.extend(
|
||||
|
||||
// keep track of opened popups
|
||||
this.popups = [];
|
||||
window.addEventListener("beforeunload", this.beforeUnloadHandler.bind(this));
|
||||
|
||||
|
||||
// initiate dark mode
|
||||
@ -1042,6 +1043,18 @@ window.fw_base = (function(){ "use strict"; return Class.extend(
|
||||
return popups.flat();
|
||||
},
|
||||
|
||||
/**
|
||||
* If this window is closed, notify popups about it
|
||||
* @param event
|
||||
*/
|
||||
beforeUnloadHandler: function (event)
|
||||
{
|
||||
this.popups.forEach(function (popup)
|
||||
{
|
||||
popup.egw_rejoin(popup);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Get application window
|
||||
* @param {type} _app
|
||||
|
Reference in New Issue
Block a user