If egw_link_handler() is defined, use that instead of window.open()

This commit is contained in:
Nathan Gray 2013-06-12 16:56:12 +00:00
parent 341342bc39
commit 04fd3b82a9

View File

@ -157,6 +157,11 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) {
if (w_h[1] == 'egw_getWindowOuterHeight()') w_h[1] = egw_getWindowOuterHeight(); if (w_h[1] == 'egw_getWindowOuterHeight()') w_h[1] = egw_getWindowOuterHeight();
return _wnd.egw_openWindowCentered2(url, _target, w_h[0], w_h[1],false,false,true); return _wnd.egw_openWindowCentered2(url, _target, w_h[0], w_h[1],false,false,true);
} }
else if (typeof _wnd.egw_link_handler == 'function' && typeof target == 'undefined')
{
// Use framework's link handler, if present
return _wnd.egw_link_handler(url,_target);
}
else else
{ {
return _wnd.open(url, _target); return _wnd.open(url, _target);