Don't redirect if href is undefined

This commit is contained in:
ruan 2015-10-08 10:40:03 +02:00
parent 4c2844e17e
commit 329088cb0d

View File

@ -361,7 +361,7 @@ class Page {
public function table_end($clicky = true) {
echo '</table>';
if ($clicky) {
echo "<script type=\"text/javascript\">withjQuery(function(){ $('tr').click(function(){window.location=$(this).find('a').attr('href');}).hover(function(){\$(this).toggleClass('hover');}); });</script>";
echo "<script type=\"text/javascript\">withjQuery(function(){ $('tr').click(function(){var href=$(this).find('a').attr('href');if(href!==undefined)window.location=href;}).hover(function(){\$(this).toggleClass('hover');}); });</script>";
}
}