Add support for app.class.method links in description

This commit is contained in:
Nathan Gray 2013-02-06 15:05:31 +00:00
parent 5513df1277
commit 4713387be1

View File

@ -114,8 +114,19 @@ var et2_description = et2_baseWidget.extend([et2_IDetachedDOM], {
_parseText: function(_value) {
if (this.options.href)
{
var href = this.options.href;
if (href.indexOf('/')==-1 && href.split('.').length >= 3 &&
!(href.indexOf('mailto:')!=-1 || href.indexOf('://') != -1 || href.indexOf('javascript:') != -1)
)
{
href = "/index.php?menuaction="+href;
}
if (href.charAt(0) == '/') // link relative to eGW
{
href = egw.link(href);
}
return [{
"href": this.options.href,
"href": href,
"text": _value
}];
}