bootstrap.css for tables, optimized caching for index.html, removed

retired categories on import
This commit is contained in:
2016-08-05 10:03:41 +02:00
parent dcbe836b1a
commit 84da2bfed3
9 changed files with 59 additions and 102 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>de.tilman</groupId> <groupId>de.tilman</groupId>
<artifactId>next-transactions</artifactId> <artifactId>next-transactions</artifactId>
<version>1.5.9</version> <version>1.5.10</version>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
@@ -48,9 +48,15 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override @Override
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) { public void writeHeaders(HttpServletRequest request, HttpServletResponse response) {
String requestUri = request.getRequestURI(); 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 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); originalWriter.writeHeaders(request, response);
} else { } else {
response.setHeader("Cache-Control", "public, max-age=6048000"); // 10 weeks response.setHeader("Cache-Control", "public, max-age=6048000"); // 10 weeks
+1 -1
View File
@@ -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 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 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, 1, null, null, 'return /\bLIDL\b/.test(x)', null, 1, 'Lidl'),
(NULL, 1, 3, null, null, 'return /\bNETTO\b/.test(x)', null, 1, 'Netto'); (NULL, 1, 3, null, null, 'return /\bNETTO\b/.test(x)', null, 1, 'Netto');
@@ -402,6 +402,14 @@ transactionControllers.controller('ImportCtrl', [ '$scope', '$resource', '$locat
categories.$promise.then(function(data) { categories.$promise.then(function(data) {
$scope.categories = categories._embedded.categories; $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) { if ($scope.importForm) {
$scope.importForm.$setPristine(); $scope.importForm.$setPristine();
$scope.importForm.$setUntouched(); $scope.importForm.$setUntouched();
@@ -2,7 +2,7 @@
<div class="row"> <div class="row">
<div>Import to <h2 style="margin-top: 1ex; margin-bottom: 2ex;">{{account.name}}</h2></div> <div>Import to <h2 style="margin-top: 1ex; margin-bottom: 2ex;">{{account.name}}</h2></div>
<table class="importTable"> <table class="table importTable">
<tr> <tr>
<th style="width: 5%;">Wertstellung</th> <th style="width: 5%;">Wertstellung</th>
<th style="width: 8%;">Typ</th> <th style="width: 8%;">Typ</th>
@@ -85,7 +85,7 @@
</div> </div>
<div class="row"> <div class="row">
<table class="listing"> <table class="table table-bordered listing">
<tr> <tr>
<th>Datum</th> <th>Datum</th>
<th>Kategorie</th> <th>Kategorie</th>
+5 -10
View File
@@ -35,17 +35,15 @@ label {
} }
.listing { .listing {
background-color: white;
font-size: 80%;
margin: auto; margin: auto;
margin-top: 2em; margin-top: 2em;
font-size: 80%;
border: none;
border-collapse: collapse;
background-color: white;
} }
.listing td, .listing th { .listing th {
border: 1px solid black; color: #555;
padding: 3px; font-size: 120%;
} }
.credit { .credit {
@@ -75,10 +73,7 @@ label {
.importTable th, .importTable td { .importTable th, .importTable td {
font-size: 80%; font-size: 80%;
border: none;
border-bottom: 1px solid #ddd;
background-color: #fff; background-color: #fff;
padding: 1ex;
} }
.importTable .spacer { .importTable .spacer {
@@ -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;
}
+24 -30
View File
@@ -1,46 +1,40 @@
<!DOCTYPE html> <!DOCTYPE html>
<html ng-app="transactionsApp"> <html ng-app="transactionsApp">
<head> <head>
<meta charset="utf-8">
<title>Transactions</title>
<meta charset="utf-8"> <link rel="stylesheet" href="bootstrap-3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="bootstrap-3.3.6/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/app.css">
<title>Transactions</title> <script src="js/angular.min.js"></script>
<script src="js/angular-route.min.js"></script>
<script src="js/angular-resource.min.js"></script>
<script src="js/angular-animate.min.js"></script>
<script src="js/angular-touch.min.js"></script>
<link rel="stylesheet" href="bootstrap-3.3.6/css/bootstrap.min.css"> <script src="js/jquery-2.1.4.min.js"></script>
<!-- link rel="stylesheet" href="bootstrap-3.3.6/css/bootstrap-theme.min.css" --> <script src="bootstrap-3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/app.css">
<script src="js/angular.min.js"></script> <script src="js/ui-bootstrap-custom-tpls-1.3.3.min.js"></script>
<script src="js/angular-route.min.js"></script>
<script src="js/angular-resource.min.js"></script>
<script src="js/angular-animate.min.js"></script>
<script src="js/angular-touch.min.js"></script>
<script src="js/jquery-2.1.4.min.js"></script> <script src="js/papaparse.min.js"></script>
<script src="bootstrap-3.3.6/js/bootstrap.min.js"></script>
<script src="js/ui-bootstrap-custom-tpls-1.3.3.min.js"></script> <script src="app/app.js"></script>
<script src="app/controllers.js"></script>
<script src="app/services.js"></script>
<script src="js/papaparse.min.js"></script> <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="app/app.js"></script> <meta name="apple-mobile-web-app-capable" content="yes">
<script src="app/controllers.js"></script>
<script src="app/services.js"></script>
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:400' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="/public/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="196x196" href="/public/icon-grey.png">
<link rel="shortcut icon" href="/public/favicon.ico">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="/public/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="196x196" href="/public/icon-grey.png">
<link rel="shortcut icon" href="/public/favicon.ico">
</head> </head>
<body> <body>