Fix click handler for .clickable items to respect user preference

feature/node-rewrite
Sven Slootweg 12 years ago
parent 29b801d42f
commit 69d5ce74d6

@ -8,7 +8,7 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="/templates/default/static/js/prettify.js"></script>
<script src="/templates/default/static/js/kickstart.js"></script>
<script src="/templates/default/static/js/cvm.js?3"></script>
<script src="/templates/default/static/js/cvm.js?6"></script>
</head>
<body>
<div class="wrapper">

@ -1,10 +1,36 @@
var command_running = false;
$(function(){
$('.clickable').click(function(){
window.location.href = $(this).data('url');
$('.clickable').click(function(event)
{
if($(this).data('url'))
{
url = $(this).data('url');
if(event.which == 1)
{
if($(this).hasClass('external'))
{
window.open(url);
}
else
{
window.location = url;
}
event.stopPropagation();
return false;
}
else if(event.which == 2)
{
window.open(url);
event.stopPropagation();
return false;
}
}
});
$('.button-loader').click(function(){
if(command_running === false)
{

Loading…
Cancel
Save