Merge pull request #582 from ChrisBr/fix71
Events open now in new tab when clicking in schedule
This commit is contained in:
commit
8e25338436
1 changed files with 11 additions and 5 deletions
|
|
@ -97,13 +97,19 @@
|
||||||
<%= javascript_tag do %>
|
<%= javascript_tag do %>
|
||||||
jQuery( function($) {
|
jQuery( function($) {
|
||||||
$('tbody tr td[data-href]').addClass('clickable').mouseup(function(e) {
|
$('tbody tr td[data-href]').addClass('clickable').mouseup(function(e) {
|
||||||
if(e.which===1)
|
var url = $(this).attr('data-href');
|
||||||
{
|
if (e.which === 1 && e.ctrlKey){
|
||||||
window.location = $(this).attr('data-href');
|
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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue