Fix adding distribution list (& maybe some other link issues) by looking for framework's link handler in open_link()

This commit is contained in:
Nathan Gray 2013-06-12 17:04:42 +00:00
parent 066ffc2c25
commit 44e96714af
2 changed files with 5 additions and 10 deletions

View File

@ -172,19 +172,14 @@ function show_custom_country(selectbox)
}
}
function add_new_list(owner)
function add_new_list()
{
if(typeof owner == 'undefined')
{
owner = egw.user('account_id');
}
var name = window.prompt(egw.lang('Name for the distribution list'));
if (name)
{
egw.open_link(egw.link('/index.php',{
'menuaction': 'addressbook.addressbook_ui.index',
egw.open('','addressbook', 'list', {
'add_list': name,
'owner': owner
}), '_self');
'owner': egw.user('account_id')
},'_self');
}
}

View File

@ -157,7 +157,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd) {
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);
}
else if (typeof _wnd.egw_link_handler == 'function' && typeof target == 'undefined')
else if (typeof _wnd.egw_link_handler == 'function' && (typeof target == 'undefined' || target =='_self'))
{
// Use framework's link handler, if present
return _wnd.egw_link_handler(url,_target);