diff --git a/pom.xml b/pom.xml index 8cebf74..ef41119 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 de.tilman next-transactions - 1.5.9 + 1.5.10 org.springframework.boot diff --git a/src/main/java/de/tilman/transactions/SecurityConfiguration.java b/src/main/java/de/tilman/transactions/SecurityConfiguration.java index 0076ee0..9d260b6 100644 --- a/src/main/java/de/tilman/transactions/SecurityConfiguration.java +++ b/src/main/java/de/tilman/transactions/SecurityConfiguration.java @@ -48,9 +48,15 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { @Override public void writeHeaders(HttpServletRequest request, HttpServletResponse response) { String requestUri = request.getRequestURI(); - if (requestUri.startsWith("/public/")) { + if (requestUri.startsWith("/public/") + || requestUri.startsWith("/bootstrap") + || requestUri.startsWith("/js/")) { response.setHeader("Cache-Control", "public, max-age=31536000"); // 1 year - } else if (requestUri.startsWith("/api/") || requestUri.startsWith("/app/") || requestUri.startsWith("/user")) { + } else if (requestUri.startsWith("/index") + || requestUri.equals("/") + || requestUri.startsWith("/api/") + || requestUri.startsWith("/app/") + || requestUri.startsWith("/user")) { originalWriter.writeHeaders(request, response); } else { response.setHeader("Cache-Control", "public, max-age=6048000"); // 10 weeks diff --git a/src/main/resources/data-h2.sql b/src/main/resources/data-h2.sql index 9d1cade..2d66304 100644 --- a/src/main/resources/data-h2.sql +++ b/src/main/resources/data-h2.sql @@ -17,7 +17,7 @@ INSERT INTO Category (id, name, account_id, position, retired) VALUES INSERT INTO Account_User (account_id, user_id) VALUES (1, 1), (1, 2), (1, 3), (2, 1); INSERT INTO Matcher (id, account_id, position, type_matcher_code, date_matcher_code, text_matcher_code, amount_matcher_code, target_category_id, target_description) VALUES - (NULL, 1, 2, null, null, 'return /\bnone\b/.test(x)', 'return (x == -40)', 4, 'Sparplan (in Rücklage)'), + (NULL, 1, 2, null, null, 'return /\bnone\b/.test(x)', 'return (x == -40)', 2, 'Sparplan (in Rücklage)'), (NULL, 1, 1, null, null, 'return /\bLIDL\b/.test(x)', null, 1, 'Lidl'), (NULL, 1, 3, null, null, 'return /\bNETTO\b/.test(x)', null, 1, 'Netto'); diff --git a/src/main/resources/static/app/controllers.js b/src/main/resources/static/app/controllers.js index 2225846..4d9d3d0 100644 --- a/src/main/resources/static/app/controllers.js +++ b/src/main/resources/static/app/controllers.js @@ -402,6 +402,14 @@ transactionControllers.controller('ImportCtrl', [ '$scope', '$resource', '$locat categories.$promise.then(function(data) { $scope.categories = categories._embedded.categories; + // remove retired categories + for (i = 0; i < $scope.categories.length; i++) { + if ($scope.categories[i].retired) { + $scope.categories.splice(i, 1); + i--; + } + } + if ($scope.importForm) { $scope.importForm.$setPristine(); $scope.importForm.$setUntouched(); diff --git a/src/main/resources/static/app/import-list.html b/src/main/resources/static/app/import-list.html index 0e49a87..357eb9a 100644 --- a/src/main/resources/static/app/import-list.html +++ b/src/main/resources/static/app/import-list.html @@ -2,7 +2,7 @@
Import to

{{account.name}}

- +
diff --git a/src/main/resources/static/app/transaction-list.html b/src/main/resources/static/app/transaction-list.html index 79641a6..d79502a 100644 --- a/src/main/resources/static/app/transaction-list.html +++ b/src/main/resources/static/app/transaction-list.html @@ -85,7 +85,7 @@
-
Wertstellung Typ
+
diff --git a/src/main/resources/static/css/app.css b/src/main/resources/static/css/app.css index a93e58a..2e99bc1 100644 --- a/src/main/resources/static/css/app.css +++ b/src/main/resources/static/css/app.css @@ -35,17 +35,15 @@ label { } .listing { + background-color: white; + font-size: 80%; margin: auto; margin-top: 2em; - font-size: 80%; - border: none; - border-collapse: collapse; - background-color: white; } -.listing td, .listing th { - border: 1px solid black; - padding: 3px; +.listing th { + color: #555; + font-size: 120%; } .credit { @@ -75,10 +73,7 @@ label { .importTable th, .importTable td { font-size: 80%; - border: none; - border-bottom: 1px solid #ddd; background-color: #fff; - padding: 1ex; } .importTable .spacer { diff --git a/src/main/resources/static/css/autocomplete.css b/src/main/resources/static/css/autocomplete.css deleted file mode 100644 index 0082d33..0000000 --- a/src/main/resources/static/css/autocomplete.css +++ /dev/null @@ -1,46 +0,0 @@ -/* AUTOCOMPLETE */ - -/* -.autocomplete { - width: 100%; - position: relative; -} - -.autocomplete input { - font-size: 1.2em; - width: 100%; - padding: 0.4em; -} -*/ - -.autocomplete ul { - position: absolute; - /*left: 0; - width: 100%;*/ - border-left: 1px solid #888; - border-right: 1px solid #888; - border-bottom: 1px solid #888; - z-index: 1; - padding-left: 0; -} - -.autocomplete li { - text-align: left; - list-style: none; - width: 100%; - padding:0; margin:0; - background-color: #fff; -} - -.autocomplete li.active { - background-color: #4bf; -} - -.autocomplete .highlight { - background-color: #E2E2E2; -} - -.autocomplete li.active .highlight { - background: #666; - color: #fff; -} \ No newline at end of file diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index b52edbb..b632d33 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -1,46 +1,40 @@ - - - -Transactions - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + Transactions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Datum Kategorie