Node: fix info url link rendering and events

fixes #8574
This commit is contained in:
Thomas Gelf 2015-03-03 13:55:33 +01:00
parent 33434590f0
commit 88e7a1ad18
2 changed files with 18 additions and 7 deletions

View file

@ -298,13 +298,24 @@ abstract class Node
}
$title = preg_replace('~(</a>)~', implode('', $this->getIcons($view)) . '$1', $this->renderLink($view));
$title = preg_replace(
'~(</a>)~',
implode('', $this->getIcons($view)) . '$1',
$this->renderLink($view)
);
if ($this->hasInfoUrl()) {
$title = ' <a href="' . $this->getInfoUrl() . '" title="'
. mt('businessprocess', 'More information') . ': ' . $this->getInfoUrl()
. '" style="float: right">'
. $view->icon('help')
. '</a>' . $title;
$url = $this->getInfoUrl();
$target = preg_match('~^https?://~', $url) ? ' target="_blank"' : '';
$title = sprintf(
' <a href="%s" %stitle="%s: %s" style="float: right">%s</a>%s',
$url,
$target,
mt('businessprocess', 'More information'),
$url,
$view->icon('help'),
$title
);
}
$html .= sprintf(

View file

@ -24,7 +24,7 @@
this.module.on('beforerender', this.rememberOpenedBps);
this.module.on('rendered', this.fixOpenedBps);
this.module.on('click', 'table.bp.process > tbody > tr:first-child > td > a:first-child', this.processTitleClick);
this.module.on('click', 'table.bp.process > tbody > tr:first-child > td > a:last-child', this.processTitleClick);
this.module.on('click', 'table.bp > tbody > tr:first-child > th', this.processOperatorClick);
this.module.on('mouseenter', 'table.bp > tbody > tr > td > a', this.procMouseOver);