diff --git a/pom.xml b/pom.xml
index a45c6ed..b6ecbdd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
4.0.0
de.tilman
next-transactions
- 1.1.4
+ 1.1.6
org.springframework.boot
diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html
index a68f1a7..e04f734 100644
--- a/src/main/resources/static/index.html
+++ b/src/main/resources/static/index.html
@@ -33,8 +33,9 @@
-
+
+
diff --git a/src/main/resources/static/js/controllers.js b/src/main/resources/static/js/controllers.js
index 9b72375..403d718 100644
--- a/src/main/resources/static/js/controllers.js
+++ b/src/main/resources/static/js/controllers.js
@@ -16,7 +16,7 @@ function numberToAmount(number) {
return amount;
}
-transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location', '$resource', '$q', '$uibModal', '$log', 'Transaction', function($scope, $location, $resource, $q, $uibModal, $log, Transaction) {
+transactionControllers.controller('TransactionListCtrl', [ '$scope', '$routeParams', '$resource', '$q', '$uibModal', '$log', 'Transaction', function($scope, $routeParams, $resource, $q, $uibModal, $log, Transaction) {
function refreshExpenses() {
var accountUsers = $resource($scope.account._links.users.href).get();
@@ -134,8 +134,15 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
var accountInfo = $resource('/accounts/search/findByUserName', { username: $scope.userid }).get();
accountInfo.$promise.then(function(data) {
$scope.accounts = accountInfo._embedded.accounts;
- if ($scope.account == undefined)
+ if ($scope.account == undefined) {
$scope.account = $scope.accounts[0];
+ if ($routeParams.account != undefined) {
+ for (i = 0; i < $scope.accounts.length; i++) {
+ if ($scope.accounts[i].name == $routeParams.account)
+ $scope.account = $scope.accounts[i];
+ }
+ }
+ }
var categories = $resource('/categories/search/listForAccount', { accountId: $scope.account.id }).get();
categories.$promise.then(function(data) {