From 27fad84f6699c92eeefa3b2bf012ac0f6923b569 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sun, 7 Feb 2016 23:51:57 +0100 Subject: [PATCH] Change double quotes into single quotes. --- accountant/frontend/static/js/accounts.js | 37 ++++--- accountant/frontend/static/js/operations.js | 106 ++++++++++---------- accountant/frontend/static/js/scheduler.js | 16 +-- 3 files changed, 85 insertions(+), 74 deletions(-) diff --git a/accountant/frontend/static/js/accounts.js b/accountant/frontend/static/js/accounts.js index 5e63943..f6c695e 100644 --- a/accountant/frontend/static/js/accounts.js +++ b/accountant/frontend/static/js/accounts.js @@ -19,25 +19,36 @@ accountantApp -.factory("Account", ["$resource", function($resource) { +.factory('Account', ['$resource', function($resource) { var Account = $resource( - "/api/account/:id", { - id: "@id" + '/api/account/:id', { + id: '@id' } ); Account.prototype.getSolds = function() { - var Solds = $resource("/api/account/:id/solds", {id: this.id}); + var Solds = $resource('/api/account/:id/solds', {id: this.id}); this.solds = Solds.get(); }; + Account.prototype.getBalance = function(begin, end) { + var Balance = $resource( + '/api/account/:id/balance', { + id: this.id, + begin: begin.format('YYYY-MM-DD'), + end: end.format('YYYY-MM-DD') + }); + + this.balance = Balance.get(); + }; + return Account; }]) .controller( - "AccountController", [ - "$scope", "Account", "Notification", + 'AccountController', [ + '$scope', 'Account', 'Notification', function($scope, Account, Notification) { /* @@ -50,9 +61,9 @@ accountantApp } if(account.current