Cleanup and formatting.

This commit is contained in:
Alexis Lahouze 2015-11-27 11:29:29 +01:00
parent 2afc7fae92
commit 1ec6383287

View File

@ -14,6 +14,7 @@
You should have received a copy of the GNU Affero General Public License You should have received a copy of the GNU Affero General Public License
along with Accountant. If not, see <http://www.gnu.org/licenses/>. along with Accountant. If not, see <http://www.gnu.org/licenses/>.
*/ */
// vim: set tw=80 ts=2 sw=2 sts=2:
accountantApp accountantApp
.factory("Operation", [ "$resource", function($resource) { .factory("Operation", [ "$resource", function($resource) {
@ -24,6 +25,9 @@ accountantApp
); );
}]) }])
/*
* Controller for category chart.
*/
.controller( .controller(
"CategoryChartController", [ "CategoryChartController", [
"$rootScope", "$scope", "$http", "$routeParams", "$rootScope", "$scope", "$http", "$routeParams",
@ -167,6 +171,9 @@ accountantApp
}); });
}]) }])
/*
* Controller for the sold chart.
*/
.controller( .controller(
"SoldChartController", [ "SoldChartController", [
"$rootScope", "$scope", "$http", "$routeParams", "$rootScope", "$scope", "$http", "$routeParams",
@ -306,15 +313,18 @@ accountantApp
$scope.loadSolds(); $scope.loadSolds();
}]) }])
/*
* Controller for the operations.
*/
.controller( .controller(
"OperationController", [ "OperationController", [
"$scope", "$http", "$rootScope", "$filter", "$routeParams", "notificationService", "Operation", "$scope", "$rootScope", "$routeParams", "notificationService", "Operation",
function($scope, $http, $rootScope, $filter, $routeParams, notificationService, Operation) { function($scope, $rootScope, $routeParams, notificationService, Operation) {
// Operation store. // List of operations.
$scope.operations = []; $scope.operations = [];
/* /*
* Add a new operation. * Add an empty operation.
*/ */
$scope.add = function() { $scope.add = function() {
var operation = new Operation({ var operation = new Operation({