Latest UI changes

This commit is contained in:
chouseknecht
2013-05-08 11:18:59 -04:00
parent 2a15d07221
commit 839d681b70
9 changed files with 602 additions and 11 deletions

View File

@@ -105,17 +105,24 @@ function InventoriesList ($scope, $rootScope, $location, $log, $routeParams, Res
});
if (scope.selected.length > 0 ) {
var inventory = null;
for (var i=0; i < scope.selected.length; i++) {
var inventory = scope.inventoies[scope.selected[i]].name;
Rest.post(scope.inventories[scope.selected[i]])
.success( function(data, status, headers, config) {
scope.queue.push({ result: 'success', data: data, status: status });
scope.$emit('callFinished');
})
.error( function(data, status, headers, config) {
scope.queue.push({ result: 'error', data: data, status: status, headers: headers });
scope.$emit('callFinished');
});
for (var j=0; j < scope.inventories.length; j++) {
if (scope.inventories[j].id == scope.selected[i]) {
inventory = scope.inventories[j];
}
}
if (inventory !== null) {
Rest.post(inventory)
.success( function(data, status, headers, config) {
scope.queue.push({ result: 'success', data: data, status: status });
scope.$emit('callFinished');
})
.error( function(data, status, headers, config) {
scope.queue.push({ result: 'error', data: data, status: status, headers: headers });
scope.$emit('callFinished');
});
}
}
}
else {