Commit c8a7027b by Dányi Bence

webui: ajax delete (public keys)

parent eb6e3c83
......@@ -14,6 +14,21 @@ $(function() {
e.stopPropagation();
delete_template_confirm($(this).data('id'), $(this).data('name'));
});
$('.delete-key-button').click(function(e){
var id=$(this).data('id');
e.preventDefault();
e.stopPropagation();
vm_confirm_popup(gettext('Are you sure deleting key?'), gettext('Delete'), function(){
$.ajax({
'type': 'POST',
'data': 'id='+id,
'url': '/ajax/key/delete/',
'success': function(){
$('#key-'+id).slideUp(700);
}
});
});
});
$('.entry .summary').unbind('click').click(toggleDetails);
if(window.navigator.userAgent.indexOf('cloud-gui') > -1) {
$('.connect-vm-button').click(function(e) {
......
......@@ -3,7 +3,7 @@
{% get_current_language as LANGUAGE_CODE %}
{% block content %}
<li class="entry">
<li class="entry" id="key-{{key.id}}">
{{block.super}}
</li>
{% endblock content %}
......
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