Commit 8a8b4bbd by Kálmán Viktor

dashboard: make the node box clickable in mass migrate

parent a9020eb7
...@@ -51,7 +51,7 @@ $(function() { ...@@ -51,7 +51,7 @@ $(function() {
if(selected.length > 0) { if(selected.length > 0) {
$('#vm-mass-ops .mass-operation').attr('disabled', false); $('#vm-mass-ops .mass-operation').attr('disabled', false);
} else { } else {
$('.vm-list-group-control a').attr('disabled', true); $('#vm-mass-ops .mass-operation').attr('disabled', true);
} }
return retval; return retval;
}); });
...@@ -61,14 +61,6 @@ $(function() { ...@@ -61,14 +61,6 @@ $(function() {
e.stopPropagation(); e.stopPropagation();
}); });
$('tbody a').click(function(e) {
// browser doesn't jump to top when clicked the buttons
if(!$(this).hasClass('real-link')) {
return false;
}
});
/* group actions */ /* group actions */
/* select all */ /* select all */
...@@ -82,7 +74,7 @@ $(function() { ...@@ -82,7 +74,7 @@ $(function() {
} }
}); });
if(selected.length > 0) if(selected.length > 0)
$('.vm-list-group-control a').attr('disabled', false); $('#vm-mass-ops .mass-operation').attr('disabled', false);
return false; return false;
}); });
...@@ -170,6 +162,10 @@ $(function() { ...@@ -170,6 +162,10 @@ $(function() {
event.preventDefault(); event.preventDefault();
}); });
$(document).on("click", ".mass-migrate-node", function() {
$(this).find('input[type="radio"]').prop("checked", true);
});
if(checkStatusUpdate()) { if(checkStatusUpdate()) {
updateStatuses(1); updateStatuses(1);
} }
......
...@@ -14,7 +14,8 @@ Choose a compute node to migrate the selected VMs to. ...@@ -14,7 +14,8 @@ Choose a compute node to migrate the selected VMs to.
{% block formfields %} {% block formfields %}
<ul id="vm-migrate-node-list" class="list-unstyled"> <ul id="vm-migrate-node-list" class="list-unstyled">
{% for n in nodes %} {% for n in nodes %}
<li class="panel panel-default"><div class="panel-body"> <li class="panel panel-default mass-migrate-node">
<div class="panel-body">
<label for="migrate-to-{{n.pk}}"> <label for="migrate-to-{{n.pk}}">
<strong>{{ n }}</strong> <strong>{{ n }}</strong>
</label> </label>
......
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