diff --git a/src/main/resources/static/js/controllers.js b/src/main/resources/static/js/controllers.js index b029bbb..836faed 100644 --- a/src/main/resources/static/js/controllers.js +++ b/src/main/resources/static/js/controllers.js @@ -44,14 +44,6 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location' $scope.postTransaction = function() { - console.log('postTransaction()'); - - // simple HTTP POST -// $http.post('/transactions', { "amount" : $scope.amount /* date, */ }).success(function() { -// console.log('REFRESH'); -// $scope.initList(); -// }); - // via Resource (might be moved into a service) var Transaction = $resource('/transactions'); @@ -64,18 +56,9 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location' "creditor" : $scope.creditor }); - console.log(newTransaction); - - // create copy of transaction object - var newTransactionCopy = (JSON.parse(JSON.stringify(newTransaction))); - - $scope.newTransaction = newTransaction; - $scope.newTransactionCopy = newTransactionCopy; - - newTransaction.$save(function(transaction, putResponseHeaders) { + newTransaction.$save(function(transaction) { $scope.refreshList(); }); - }; $scope.showTransaction = function(transaction) { diff --git a/src/main/resources/static/partials/transaction-list.html b/src/main/resources/static/partials/transaction-list.html index ac8fb4d..f0d76e2 100644 --- a/src/main/resources/static/partials/transaction-list.html +++ b/src/main/resources/static/partials/transaction-list.html @@ -35,17 +35,9 @@
{{newTransaction | json}}
- {{newTransactionCopy | json}}
- {{account | json}}
+ {{transactions | json}}