AC-229 Multie-select now working

This commit is contained in:
chouseknecht 2013-07-19 16:01:41 -04:00
parent 419e18d1f8
commit 37027088fd

View File

@ -122,8 +122,21 @@ angular.module('SelectionHelper', ['Utilities', 'RestServices'])
}
scope.SelectPostRefreshRemove = scope.$on('PostRefresh', function() {
for (var i=0; i < scope[list.name].length; i++) {
scope[list.name][i]['checked'] = '0';
scope[list.name][i]['success_class'] = '';
var found = false;
for (var j=0; j < scope.selected.length; j++) {
if (scope.selected[j].id == scope[list.name][i].id) {
found = true;
break;
}
}
if (found) {
scope[list.name][i]['checked'] = '1';
scope[list.name][i]['success_class'] = 'success';
}
else {
scope[list.name][i]['checked'] = '0';
scope[list.name][i]['success_class'] = '';
}
}
});
}