Events open now in new tab when clicking in schedule

close #71
This commit is contained in:
chrisbr 2015-01-15 16:28:53 +01:00
parent bca62e6204
commit 5446c349c2

View file

@ -97,13 +97,19 @@
<%= javascript_tag do %>
jQuery( function($) {
$('tbody tr td[data-href]').addClass('clickable').mouseup(function(e) {
if(e.which===1)
{
window.location = $(this).attr('data-href');
var url = $(this).attr('data-href');
if (e.which === 1 && e.ctrlKey){
var win = window.open(url, '_blank');
win.focus();
}
else if(e.which===2)
else if(e.which === 1)
{
window.open($(this).attr('data-href'), '_blank');
window.location = url;
}
else if(e.which === 2)
{
var win = window.open(url, '_blank');
win.focus();
}
});
});