diff --git a/accountant/frontend/static/js/accounts.js b/accountant/frontend/static/js/accounts.js index 537419f..06e2829 100644 --- a/accountant/frontend/static/js/accounts.js +++ b/accountant/frontend/static/js/accounts.js @@ -29,8 +29,8 @@ accountantApp .controller( "AccountController", [ - "$scope", "$rootScope", "$window", "$routeParams", "Accounts", - function($scope, $rootScope, $window, $routeParams, Accounts) { + "$scope", "$rootScope", "$routeParams", "Accounts", + function($scope, $rootScope, $routeParams, Accounts) { $scope.accountClass = function(account) { if(account == $scope.selectedAccount) { @@ -56,7 +56,7 @@ accountantApp $scope.createAccount = function(account) { account.$save(function(account) { // Reset new account. - $scope.resetAccount(account); + $scope.cancelEditAccount(account); $scope.$emit("accountCreatedEvent", account); }); @@ -84,7 +84,7 @@ accountantApp * Start account edition. */ $scope.editAccount = function(account) { - account.editing = true; + account.edit = true; }; /* diff --git a/accountant/frontend/static/templates/accounts.html b/accountant/frontend/static/templates/accounts.html index b74ea7a..18193ee 100644 --- a/accountant/frontend/static/templates/accounts.html +++ b/accountant/frontend/static/templates/accounts.html @@ -60,7 +60,7 @@ -