Commit 478dc8ba by Dányi Bence

webui: fix js event handlers

parent 81e64796
...@@ -31,13 +31,13 @@ $(function() { ...@@ -31,13 +31,13 @@ $(function() {
}); });
$('.entry .summary').unbind('click').click(toggleDetails); $('.entry .summary').unbind('click').click(toggleDetails);
if(window.navigator.userAgent.indexOf('cloud-gui') > -1) { if(window.navigator.userAgent.indexOf('cloud-gui') > -1) {
$('.connect-vm-button').click(function(e) { $('.connect-vm').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
get_vm_details($(this).data('id')); get_vm_details($(this).data('id'));
}); });
} else { } else {
$('.connect-vm-button').click(function(e) { $('.connect-vm').click(function(e) {
e.stopPropagation(); e.stopPropagation();
}); });
} }
...@@ -46,32 +46,32 @@ $(function() { ...@@ -46,32 +46,32 @@ $(function() {
e.stopPropagation(); e.stopPropagation();
new_vm($(this).data('id')); new_vm($(this).data('id'));
}); });
$('.stop-vm-button').click(function(e) { $('.stop-vm').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
stop_vm($(this).data('id'), $(this).data('name')); stop_vm($(this).data('id'), $(this).data('name'));
}); });
$('.resume-vm-button').click(function(e) { $('.resume-vm').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
manage_vm($(this).data('id'), "resume"); manage_vm($(this).data('id'), "resume");
}); });
$('.delete-vm-button').click(function(e) { $('.delete-vm').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
delete_vm($(this).data('id'), $(this).data('name')); delete_vm($(this).data('id'), $(this).data('name'));
}); });
$('.restart-vm-button').click(function(e) { $('.restart-vm').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
restart_vm($(this).data('id'), $(this).data('name')); restart_vm($(this).data('id'), $(this).data('name'));
}); });
$('.renew-suspend-vm-button').click(function(e) { $('.renew-suspend-vm').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
renew_suspend_vm($(this).data('id')) renew_suspend_vm($(this).data('id'))
}); });
$('.renew-delete-vm-button').click(function(e) { $('.renew-delete-vm').click(function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
renew_delete_vm($(this).data('id')) renew_delete_vm($(this).data('id'))
......
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