forked from extern/egroupware
Introduce new target type called "_browser", in order to specify browser default link handling
- Description widget using href, the default target would be _browser - Call filemanager egw.open with target _browser
This commit is contained in:
parent
8c2f74ba14
commit
c3eed99cdd
@ -70,7 +70,7 @@ var et2_description = expose(et2_baseWidget.extend([et2_IDetachedDOM],
|
||||
"extra_link_target": {
|
||||
"name": "Link target",
|
||||
"type": "string",
|
||||
"default": "_self",
|
||||
"default": "_browser",
|
||||
"description": "Link target for href attribute"
|
||||
},
|
||||
"extra_link_popup": {
|
||||
|
@ -745,7 +745,7 @@ app.classes.filemanager = AppJS.extend(
|
||||
}
|
||||
else
|
||||
{
|
||||
egw.open({path: path, type: data.data.mime}, 'file');
|
||||
egw.open({path: path, type: data.data.mime}, 'file','view',null,'_browser');
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -334,27 +334,18 @@ 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)
|
||||
if (_target == '_browser')
|
||||
{
|
||||
_target = egwIsMobile()?'_self':'_blank';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user