Commit 2f01c2f66dcf4a515a1f896fc8bc23ea1515eaa9

Authored by Renato De Donato
1 parent 4f438cd9

preselect bug

controllets/providers-utility-controllet/providers-utility-controllet.html
... ... @@ -31,9 +31,9 @@
31 31 utility_getSelectedIndices = function(fields, selectedFileds) {
32 32 console.log("we");
33 33 var selectedIndices = [];
34   - for (var i = 0; i < fields.length; i++)
35   - if($.inArray(fields[i], selectedFileds) > -1)
36   - selectedIndices.push(i);
  34 + for (var i = 0; i < selectedFileds.length; i++)
  35 + if($.inArray(selectedFileds[i], fields) > -1)
  36 + selectedIndices.push(fields.indexOf(selectedFileds[i]));
37 37 return selectedIndices;
38 38 };
39 39  
... ...