mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-04 10:11:26 +01:00
Some more memory cleanup
This commit is contained in:
parent
0e15989eda
commit
73f30a94b1
@ -576,5 +576,5 @@ window.nm_hide_popup = function(element, div_id)
|
||||
*/
|
||||
window.nm_activate_link = function(_action, _senders)
|
||||
{
|
||||
jQuery(_senders[0].iface.getDOMNode()).find('.et2_clickable:first').trigger('click');
|
||||
_senders[0].iface.getDOMNode().querySelector('.et2_clickable').dispatchEvent(new Event('click'));
|
||||
}
|
||||
|
@ -65,6 +65,7 @@ export class et2_nextmatch_rowProvider
|
||||
this._subgridCallback = null;
|
||||
this._context = null;
|
||||
this._rootWidget = null;
|
||||
this._template.seperated = null;
|
||||
this._template = null;
|
||||
this._dataRow = null;
|
||||
}
|
||||
|
@ -62,6 +62,7 @@
|
||||
if (this.sidemenuEntry) this.sidemenuEntry.remove();
|
||||
delete this.sidemenuEntry;
|
||||
delete this.browser;
|
||||
delete this.parentFw;
|
||||
delete (framework.applications[this.appName]);
|
||||
};
|
||||
|
||||
|
@ -174,6 +174,22 @@ window.app = {classes: {}};
|
||||
window.egw.top = window;
|
||||
}
|
||||
|
||||
// Register unload listener for cleanup
|
||||
if (popup)
|
||||
{
|
||||
// Uncomment this to debug pagehide events
|
||||
// window.onpagehide = (e) => { debugger;};
|
||||
window.addEventListener("pagehide", (e) =>
|
||||
{
|
||||
if (window.framework)
|
||||
{
|
||||
window.framework.popup_close(window);
|
||||
}
|
||||
window.framework = null;
|
||||
window.egw = null;
|
||||
})
|
||||
}
|
||||
|
||||
// focus window / call window.focus(), if data-window-focus is specified
|
||||
var window_focus = egw_script.getAttribute('data-window-focus');
|
||||
if (window_focus && JSON.parse(window_focus))
|
||||
|
@ -26,22 +26,23 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
|
||||
"use strict";
|
||||
|
||||
const tooltipped = [];
|
||||
_wnd.addEventListener("unload", (e) =>
|
||||
let tooltip_div = null;
|
||||
let current_elem = null;
|
||||
_wnd.addEventListener("pagehide", () =>
|
||||
{
|
||||
tooltipped.forEach(node =>
|
||||
{
|
||||
egw.tooltipUnbind(node);
|
||||
});
|
||||
tooltipped.splice(0, tooltipped.length);
|
||||
if (tooltip_div && tooltipped_div.off)
|
||||
if (tooltip_div && tooltip_div.off)
|
||||
{
|
||||
tooltipped_div.off();
|
||||
tooltip_div.off();
|
||||
tooltip_div = null;
|
||||
}
|
||||
return null;
|
||||
})
|
||||
|
||||
let tooltip_div = null;
|
||||
let current_elem = null;
|
||||
|
||||
const time_delta = 100;
|
||||
let show_delta = 0;
|
||||
@ -152,7 +153,7 @@ egw.extend('tooltip', egw.MODULE_WND_LOCAL, function(_app, _wnd)
|
||||
jQuery(_wnd.document.body).append(tooltip_div);
|
||||
|
||||
//The tooltip should automatically hide when the mouse comes over it
|
||||
tooltip_div.on("mouseenter.tooltip", function ()
|
||||
tooltip_div.get(0).addEventListener("mouseover", () =>
|
||||
{
|
||||
if (_options.hideonhover) hide();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user