fixed nm_active_link, to also active links, not only onclick handlers

This commit is contained in:
Ralf Becker 2012-03-13 11:08:02 +00:00
parent b68cbecbe2
commit e2a662289b

View File

@ -352,5 +352,17 @@ function nm_activate_link(_action, _senders)
{ {
// $j(_senders[0].iface.getDOMNode()).find('a:first').trigger('click'); not sure why this is NOT working // $j(_senders[0].iface.getDOMNode()).find('a:first').trigger('click'); not sure why this is NOT working
$j(_senders[0].iface.getDOMNode()).find('a:first').click(); var a_href = $j(_senders[0].iface.getDOMNode()).find('a:first');
if (typeof a_href != undefined)
{
var target = a_href.attr('target');
var href = a_href.attr('href');
if (a_href.attr('onclick'))
a_href.click();
else if (target)
window.open(href,target);
else
window.location = href;
}
} }