From 9df93e1ef11a7feb705aaf8c1d676127b2a221fd Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Mon, 20 Jul 2015 12:59:26 +0200 Subject: [PATCH] Use object attribute for editing. --- accountant/frontend/static/js/accounts.js | 4 ++-- accountant/frontend/static/templates/accounts.html | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/accountant/frontend/static/js/accounts.js b/accountant/frontend/static/js/accounts.js index cb38a8e..613a889 100644 --- a/accountant/frontend/static/js/accounts.js +++ b/accountant/frontend/static/js/accounts.js @@ -33,7 +33,7 @@ accountantApp function($scope, $rootScope, $routeParams, Accounts) { $scope.valueClass = function(account, value) { - if(!account) { + if(!account || !value) { return; } @@ -78,7 +78,7 @@ accountantApp * Start account edition. */ $scope.editAccount = function(account) { - account.edit = true; + account.editing = true; }; /* diff --git a/accountant/frontend/static/templates/accounts.html b/accountant/frontend/static/templates/accounts.html index 83efe71..24901e0 100644 --- a/accountant/frontend/static/templates/accounts.html +++ b/accountant/frontend/static/templates/accounts.html @@ -60,10 +60,10 @@ - + {{ account.name }} - {{ account.current }} - {{ account.pointed }} + {{ account.current }} + {{ account.pointed }} {{ account.authorized_overdraft }}
@@ -85,13 +85,13 @@ - + - {{ account.current }} - {{ account.pointed }} + {{ account.current }} + {{ account.pointed }}