mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
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": {
|
"extra_link_target": {
|
||||||
"name": "Link target",
|
"name": "Link target",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "_self",
|
"default": "_browser",
|
||||||
"description": "Link target for href attribute"
|
"description": "Link target for href attribute"
|
||||||
},
|
},
|
||||||
"extra_link_popup": {
|
"extra_link_popup": {
|
||||||
|
@ -745,7 +745,7 @@ app.classes.filemanager = AppJS.extend(
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
egw.open({path: path, type: data.data.mime}, 'file');
|
egw.open({path: path, type: data.data.mime}, 'file','view',null,'_browser');
|
||||||
}
|
}
|
||||||
return false;
|
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"))
|
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')
|
if(_target == '_self')
|
||||||
{
|
{
|
||||||
// '_self' isn't allowed, but we can handle it
|
// '_self' isn't allowed, but we can handle it
|
||||||
_target = undefined;
|
_target = undefined;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return _wnd.open(url, _target);
|
|
||||||
}
|
|
||||||
// Use framework's link handler, if present
|
// Use framework's link handler, if present
|
||||||
return this.link_handler(url,_target);
|
return this.link_handler(url,_target);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No mime type registered, set target properly based on browsing environment
|
// No mime type registered, set target properly based on browsing environment
|
||||||
if (!mime_info)
|
if (_target == '_browser')
|
||||||
{
|
{
|
||||||
_target = egwIsMobile()?'_self':'_blank';
|
_target = egwIsMobile()?'_self':'_blank';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user