Commit 6005eb05 by Őry Máté

one: prevent default actions for connect links

parent 483d0f44
...@@ -41,6 +41,9 @@ $(function() { ...@@ -41,6 +41,9 @@ $(function() {
delete_template_confirm($(this).data('id'), $(this).data('name')); delete_template_confirm($(this).data('id'), $(this).data('name'));
}); });
$('.wm .summary').unbind('click').click(toggleDetails); $('.wm .summary').unbind('click').click(toggleDetails);
$('.connect-vm-button').click(function(e) {
e.stopPropagation();
});
$('.stop-vm-button').click(function(e) { $('.stop-vm-button').click(function(e) {
e.preventDefault(); e.stopPropagation(); e.preventDefault(); e.stopPropagation();
stop_vm($(this).data('id'), $(this).data('name')); stop_vm($(this).data('id'), $(this).data('name'));
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</div> </div>
<div class="actions"> <div class="actions">
{% if i.state == 'ACTIVE' %} {% if i.state == 'ACTIVE' %}
<a href="{{i.get_connect_uri}}" title="{% trans "Connect" %}"> <a href="{{i.get_connect_uri}}" class="connect-vm-button" title="{% trans "Connect" %}">
<img src="/static/icons/plug.png" alt="{% trans "Connect" %}" /> <img src="/static/icons/plug.png" alt="{% trans "Connect" %}" />
</a> </a>
<a href="#" class="stop-vm-button" data-name="{{ i.name}}" data-id="{{ i.id }}" title="{% trans "Pause" %}"> <a href="#" class="stop-vm-button" data-name="{{ i.name}}" data-id="{{ i.id }}" title="{% trans "Pause" %}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment