mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
Try to open contents, which have no mime type registered, properly in different browsing environments
This commit is contained in:
parent
186a6b968f
commit
585d42dbde
@ -321,6 +321,7 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
||||
if (mime_info.mime_popup) _popup = mime_info.mime_popup;
|
||||
if (mime_info.mime_target) _target = mime_info.mime_target;
|
||||
}
|
||||
|
||||
if (_popup)
|
||||
{
|
||||
var w_h = _popup.split('x');
|
||||
@ -333,16 +334,30 @@ egw.extend('open', egw.MODULE_WND_LOCAL, function(_egw, _wnd)
|
||||
}
|
||||
else if ((typeof _target == 'undefined' || _target == '_self' || typeof this.link_app_list()[_target] != "undefined"))
|
||||
{
|
||||
// No mime type registered, set target properly based on browsing environment
|
||||
if (!mime_info)
|
||||
{
|
||||
_target = egwIsMobile()?'_self':'_blank';
|
||||
}
|
||||
if(_target == '_self')
|
||||
{
|
||||
// '_self' isn't allowed, but we can handle it
|
||||
_target = undefined;
|
||||
}
|
||||
else
|
||||
{
|
||||
return _wnd.open(url, _target);
|
||||
}
|
||||
// Use framework's link handler, if present
|
||||
return this.link_handler(url,_target);
|
||||
}
|
||||
else
|
||||
{
|
||||
// No mime type registered, set target properly based on browsing environment
|
||||
if (!mime_info)
|
||||
{
|
||||
_target = egwIsMobile()?'_self':'_blank';
|
||||
}
|
||||
return _wnd.open(url, _target);
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user