From e18009b0dd9f6825b474acfc61f1b42605d44bfe Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Wed, 15 Jul 2015 18:28:56 +0200 Subject: [PATCH] Cleanup account frontend. --- accountant/frontend/static/js/accounts.js | 8 ++--- .../frontend/static/templates/accounts.html | 30 ++++++++++++++++++- 2 files changed, 33 insertions(+), 5 deletions(-) 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 @@ - + [[ account.name ]] [[ account.current ]] [[ account.pointed ]] @@ -84,6 +84,34 @@ + + + + + + + [[ account.current ]] + [[ account.pointed ]] + + + + + + +
+ + + +
+ +