mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +01:00
Also accept just the window name to windowClosed(), as sometimes window.name is not available anymore.
This commit is contained in:
parent
81076f6e89
commit
746e6ea193
@ -342,11 +342,18 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) {
|
||||
return list;
|
||||
},
|
||||
|
||||
/**
|
||||
* Notify egw of closing a named window
|
||||
*
|
||||
* @param {String} appname
|
||||
* @param {Window|String} closed Window that was closed, or its name
|
||||
* @returns {undefined}
|
||||
*/
|
||||
windowClosed: function(appname, closed) {
|
||||
var closed_window = closed
|
||||
var closed_name = closed.name;
|
||||
var closed_name = typeof closed == "string" ? closed : closed.name;
|
||||
var closed_window = typeof closed == "string" ? null : closed;
|
||||
window.setTimeout(function() {
|
||||
if(!closed_window.closed) return;
|
||||
if(closed_window != null && !closed_window.closed) return;
|
||||
var open_windows = egw.getOpenWindows(appname, closed_name)
|
||||
|
||||
var index = open_windows.indexOf(closed_name);
|
||||
|
Loading…
Reference in New Issue
Block a user