Commit 9f4783eb by Kálmán Viktor

dashboard: better way to construct ajax call params

parent 6282576e
......@@ -82,10 +82,7 @@ $(function() {
/* mass operations */
$("#vm-mass-ops").on('click', '.mass-operation', function(e) {
var icon = $(this).children("i").addClass('fa-spinner fa-spin');
params = "?a";
for(var i=0; i<selected.length; i++) {
params += "&vm=" + selected[i].vm;
}
params = "?" + selected.map(function(a){return "vm=" + a.vm}).join("&");
$.ajax({
type: 'GET',
......
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