Override window.close() with framework specific close function

This commit is contained in:
Hadi Nategh 2014-11-27 17:01:47 +00:00
parent 81ef504361
commit 7984f04078
2 changed files with 17 additions and 2 deletions

View File

@ -174,7 +174,7 @@
{
egw(window.opener).message(JSON.parse(egw_script.getAttribute('data-message')));
}
window.close();
egw(window).close();
}
// call egw.open_link, if popup attr specified

View File

@ -336,6 +336,21 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
}
},
/**
* Close current window / popup
*/
close: function()
{
if (_wnd.framework && typeof _wnd.framework.popup_close == "function")
{
_wnd.framework.popup_close(_wnd);
}
else
{
_wnd.close();
}
},
/**
* Check if browser pop-up blocker is on/off
*
@ -385,4 +400,4 @@ try {
}
} catch (e) {}
});
*/
*/