Commit 9f4783eb by Kálmán Viktor

dashboard: better way to construct ajax call params

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