Compare commits
20 Commits
bugfix/mar
...
legacy_def
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f48fc12c8 | |||
| 591f5dd3af | |||
| a6983780f5 | |||
| 1db28b5bc0 | |||
| 285343218b | |||
| f402122d0c | |||
| 4339e4fd98 | |||
| 16cbcdff60 | |||
| 8dc77f52e4 | |||
| b04b9b92a6 | |||
| 8d66ed4cbe | |||
| b0ee825e0a | |||
| a321c813de | |||
| fda40d72f8 | |||
| 2375746d91 | |||
| cf0cf2f5e9 | |||
| 3e71ecc6cb | |||
| 1302165ab2 | |||
| d08138c9e1 | |||
| 4cd1ea3277 |
26
Dockerfile
26
Dockerfile
@@ -1,15 +1,15 @@
|
||||
FROM alpine:3.22 AS svelte_build
|
||||
RUN apk add npm
|
||||
RUN adduser -Dh /home/svelte svelte
|
||||
ADD . /home/svelte/Umbrella
|
||||
ADD frontend /home/svelte/Umbrella/frontend
|
||||
RUN chown -R svelte /home/svelte/Umbrella
|
||||
USER svelte
|
||||
WORKDIR /home/svelte/Umbrella/frontend
|
||||
RUN npm install && npm run build
|
||||
|
||||
|
||||
FROM alpine AS java_build
|
||||
RUN apk add gradle fontconfig font-opensans openjdk21-jre
|
||||
FROM alpine:3.22 AS java_build
|
||||
RUN apk add gradle
|
||||
ADD . /Umbrella
|
||||
WORKDIR /Umbrella
|
||||
COPY --from=svelte_build /home/svelte/Umbrella/frontend/dist web/src/main/resources/web
|
||||
@@ -17,14 +17,18 @@ RUN gradle --no-daemon build
|
||||
|
||||
|
||||
FROM alpine
|
||||
RUN apk add bash fontconfig font-opensans graphviz openjdk21-jre weasyprint
|
||||
RUN adduser -D umbrella
|
||||
COPY --from=java_build /Umbrella/backend/build/libs/backend.jar /home/umbrella/jar/
|
||||
RUN chown -R umbrella /home/umbrella
|
||||
ADD https://github.com/plantuml/plantuml/releases/download/v1.2025.10/plantuml-1.2025.10.jar /home/umbrella/plantuml.jar
|
||||
RUN apk --no-cache add bash fontconfig font-opensans graphviz openjdk21-jre tzdata weasyprint \
|
||||
&& adduser -D umbrella
|
||||
WORKDIR /home/umbrella
|
||||
RUN chmod a+rx plantuml.jar
|
||||
USER umbrella
|
||||
RUN mkdir .config && ln -s /host/config.json .config/Umbrella.json
|
||||
|
||||
EXPOSE 80
|
||||
CMD java -jar jar/backend.jar
|
||||
|
||||
ADD https://github.com/plantuml/plantuml/releases/download/v1.2025.10/plantuml-1.2025.10.jar /home/umbrella/plantuml.jar
|
||||
COPY --from=java_build /Umbrella/backend/build/libs/backend.jar /home/umbrella/jar/
|
||||
RUN mkdir .config \
|
||||
&& ln -s /host/config.json .config/Umbrella.json \
|
||||
&& chmod a+rx plantuml.jar \
|
||||
&& chown -R umbrella . \
|
||||
&& ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
|
||||
USER umbrella
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
FROM alpine:3.22
|
||||
LABEL Maintainer "Stephan Richter <s.richter@srsoftware.de>"
|
||||
LABEL Maintainer "Stephan Richter"
|
||||
ARG UID=1000
|
||||
ARG GID=1000
|
||||
RUN apk add bash npm
|
||||
|
||||
@@ -40,6 +40,7 @@ public class Util {
|
||||
private static final JParsedown MARKDOWN = new JParsedown();
|
||||
public static final String SHA1 = "SHA-1";
|
||||
private static final MessageDigest SHA1_DIGEST;
|
||||
private static final Map<Integer,String> umlCache = new HashMap<>();
|
||||
|
||||
static {
|
||||
try {
|
||||
@@ -84,6 +85,17 @@ public class Util {
|
||||
var start = matcher.start(0);
|
||||
var end = matcher.end(0);
|
||||
|
||||
var umlHash = uml.hashCode();
|
||||
LOG.log(DEBUG,"Hash of Plantuml code: {0}",umlHash);
|
||||
var svg = umlCache.get(umlHash);
|
||||
if (svg != null){
|
||||
LOG.log(DEBUG,"Serving Plantuml generated SVG from cache…");
|
||||
source = source.substring(0, start) + svg + source.substring(end);
|
||||
matcher = UML_PATTERN.matcher(source);
|
||||
continue;
|
||||
}
|
||||
|
||||
LOG.log(DEBUG,"Cache miss. Generating SVG from plantuml code…");
|
||||
ProcessBuilder processBuilder = new ProcessBuilder("java", "-jar", plantumlJar.getAbsolutePath(), "-tsvg", "-pipe");
|
||||
var ignored = processBuilder.redirectErrorStream();
|
||||
var process = processBuilder.start();
|
||||
@@ -94,7 +106,9 @@ public class Util {
|
||||
|
||||
try (InputStream is = process.getInputStream()) {
|
||||
byte[] out = is.readAllBytes();
|
||||
var svg = new String(out, UTF_8);
|
||||
LOG.log(DEBUG,"Generated SVG. Pushing to cache…");
|
||||
svg = new String(out, UTF_8);
|
||||
umlCache.put(umlHash,svg);
|
||||
source = source.substring(0, start) + svg + source.substring(end);
|
||||
matcher = UML_PATTERN.matcher(source);
|
||||
}
|
||||
|
||||
@@ -541,6 +541,11 @@ public class DocumentApi extends BaseHandler implements DocumentService {
|
||||
var userCompanyIds = companyService().listCompaniesOf(user).keySet();
|
||||
|
||||
var documents = db.find(userCompanyIds,keys,fulltext);
|
||||
try {
|
||||
Thread.sleep(5000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
return sendContent(ex,mapValues(documents));
|
||||
}
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
</div>
|
||||
<div>{t('state')}</div>
|
||||
<div>
|
||||
<StateSelector selected={project.status} onchange={val => update({status:val})} {project} />
|
||||
<StateSelector selected={project.status} onchange={val => update({status:+val})} {project} />
|
||||
</div>
|
||||
{#if project.company}
|
||||
<div>{t('company')}</div>
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
<script>
|
||||
import { onMount } from 'svelte';
|
||||
import { useTinyRouter } from 'svelte-tiny-router';
|
||||
import { api, post, target } from '../../urls.svelte.js';
|
||||
import { error, yikes } from '../../warn.svelte';
|
||||
import { api, get, post, target } from '../../urls.svelte.js';
|
||||
import { error, warn, yikes } from '../../warn.svelte';
|
||||
import { t } from '../../translations.svelte.js';
|
||||
import { display } from '../../time.svelte';
|
||||
|
||||
import Bookmark from '../bookmark/Template.svelte';
|
||||
|
||||
const router = useTinyRouter();
|
||||
let counter = 9;
|
||||
let bookmarks = $state(null);
|
||||
let companies = $state(null);
|
||||
let documents = $state(null);
|
||||
@@ -34,12 +35,12 @@
|
||||
});
|
||||
|
||||
function doSearch(ignored){
|
||||
warn(t('searching…'));
|
||||
let url = window.location.origin + window.location.pathname;
|
||||
if (key) url += '?key=' + encodeURI(key);
|
||||
window.history.replaceState(history.state, '', url);
|
||||
|
||||
const data = { key : key, fulltext : fulltext };
|
||||
|
||||
post(api('bookmark/search'),data).then(handleBookmarks);
|
||||
post(api('company/search '),data).then(handleCompanies);
|
||||
post(api('document/search'),data).then(handleDocuments);
|
||||
@@ -51,6 +52,22 @@
|
||||
post(api('wiki/search' ),data).then(handleWikiPages);
|
||||
}
|
||||
|
||||
async function getTitle(key,module,entity_id){
|
||||
get(api(module+'/'+entity_id)).then(res => setTitle(res,key,module))
|
||||
}
|
||||
|
||||
async function setTitle(resp,key,module){
|
||||
if (resp.ok){
|
||||
const json = await resp.json();
|
||||
if (json.name) notes[key].title = t(module)+": "+json.name;
|
||||
if (json.title) notes[key].title = t(module)+": "+json.title;
|
||||
if (module == 'document'){
|
||||
notes[key].title = t(json.type)+" "+json.number;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function onclick(e){
|
||||
e.preventDefault();
|
||||
var target = e.target;
|
||||
@@ -61,6 +78,7 @@
|
||||
}
|
||||
|
||||
async function handleBookmarks(resp){
|
||||
quitOne();
|
||||
if (resp.ok){
|
||||
const res = await resp.json();
|
||||
bookmarks = Object.keys(res).length ? res : null;
|
||||
@@ -70,6 +88,7 @@
|
||||
}
|
||||
|
||||
async function handleCompanies(resp){
|
||||
quitOne();
|
||||
if (resp.ok){
|
||||
const json = await resp.json();
|
||||
companies = Object.keys(json).length ? json : null;
|
||||
@@ -79,6 +98,7 @@
|
||||
}
|
||||
|
||||
async function handleDocuments(resp){
|
||||
quitOne();
|
||||
if (resp.ok){
|
||||
const json = await resp.json();
|
||||
documents = Object.keys(json).length ? json : null;
|
||||
@@ -88,15 +108,25 @@
|
||||
}
|
||||
|
||||
async function handleNotes(resp){
|
||||
quitOne();
|
||||
if (resp.ok){
|
||||
const json = await resp.json();
|
||||
notes = Object.keys(json).length ? json : null;
|
||||
if ( Object.keys(json).length ) {
|
||||
for (let key of Object.keys(json)){
|
||||
let module = json[key].module;
|
||||
let entity_id = json[key].entity_id;
|
||||
json[key].title = t(module)+' '+entity_id;
|
||||
getTitle(key,module,entity_id);
|
||||
}
|
||||
notes = json;
|
||||
} else notes = null;
|
||||
} else {
|
||||
error(resp);
|
||||
}
|
||||
}
|
||||
|
||||
async function handleProjects(resp){
|
||||
quitOne();
|
||||
if (resp.ok){
|
||||
const res = await resp.json();
|
||||
projects = Object.keys(res).length ? res : null;
|
||||
@@ -106,6 +136,7 @@
|
||||
}
|
||||
|
||||
async function handleStock(resp){
|
||||
quitOne();
|
||||
if (resp.ok){
|
||||
const res = await resp.json();
|
||||
stock = Object.keys(res).length ? res : null;
|
||||
@@ -115,6 +146,7 @@
|
||||
}
|
||||
|
||||
async function handleTasks(resp){
|
||||
quitOne();
|
||||
if (resp.ok){
|
||||
const res = await resp.json();
|
||||
tasks = Object.keys(res).length ? res : null;
|
||||
@@ -124,6 +156,7 @@
|
||||
}
|
||||
|
||||
async function handleTimes(resp){
|
||||
quitOne();
|
||||
if (resp.ok){
|
||||
const res = await resp.json();
|
||||
times = Object.keys(res).length ? res : null;
|
||||
@@ -133,6 +166,7 @@
|
||||
}
|
||||
|
||||
async function handleWikiPages(resp){
|
||||
quitOne();
|
||||
if (resp.ok){
|
||||
const res = await resp.json();
|
||||
pages = Object.keys(res).length ? res : null;
|
||||
@@ -140,6 +174,13 @@
|
||||
error(resp);
|
||||
}
|
||||
}
|
||||
|
||||
function quitOne(){
|
||||
counter--;
|
||||
if (counter > 0) {
|
||||
warn(t('searching…')+" "+counter);
|
||||
} else yikes();
|
||||
}
|
||||
|
||||
$effect(() => doSearch(key))
|
||||
</script>
|
||||
@@ -236,23 +277,6 @@
|
||||
</ul>
|
||||
</fieldset>
|
||||
{/if}
|
||||
{#if notes}
|
||||
<fieldset>
|
||||
<legend>
|
||||
{t('notes')}
|
||||
</legend>
|
||||
<ul>
|
||||
{#each Object.values(notes) as note}
|
||||
<li>
|
||||
<b>
|
||||
<a href="/{note.module}/{note.entity_id}/view" {onclick} >{t(note.module)} {note.entity_id}:</a>
|
||||
</b>
|
||||
{@html target(note.text.rendered)}
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</fieldset>
|
||||
{/if}
|
||||
{#if times}
|
||||
<fieldset>
|
||||
<legend>
|
||||
@@ -308,3 +332,20 @@
|
||||
</ul>
|
||||
</fieldset>
|
||||
{/if}
|
||||
{#if notes}
|
||||
<fieldset>
|
||||
<legend>
|
||||
{t('notes')}
|
||||
</legend>
|
||||
<ul>
|
||||
{#each Object.values(notes) as note}
|
||||
<li>
|
||||
<b>
|
||||
<a href="/{note.module}/{note.entity_id}/view" {onclick} >{note.title}</a>
|
||||
</b>
|
||||
{@html target(note.text.rendered)}
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</fieldset>
|
||||
{/if}
|
||||
|
||||
84
legacy/src/main/resources/css/default/colors.css
Normal file
84
legacy/src/main/resources/css/default/colors.css
Normal file
@@ -0,0 +1,84 @@
|
||||
body{
|
||||
color: orange;
|
||||
background-color: black;
|
||||
}
|
||||
a{
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.tasks .pending>a{
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.completed>a,
|
||||
.started>a{
|
||||
color: #5bc500;
|
||||
}
|
||||
|
||||
.canceled>a{
|
||||
color: gray;
|
||||
}
|
||||
|
||||
tr{
|
||||
background-color: #52525270;
|
||||
}
|
||||
tr:nth-child(2n+1){
|
||||
background-color: #a7a7a740;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border-color: orange;
|
||||
}
|
||||
|
||||
.button,
|
||||
input,
|
||||
button {
|
||||
background-color: orange;
|
||||
color: #303030;
|
||||
}
|
||||
.hover{
|
||||
background-color: black;
|
||||
border-color: orange;
|
||||
}
|
||||
|
||||
form.invoice textarea {
|
||||
background-color: orange;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.infos span{
|
||||
background-color: #00ad00;
|
||||
color: black;
|
||||
}
|
||||
.errors span{
|
||||
background-color: #ff9847;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.warnings span{
|
||||
background-color: #ffff00;
|
||||
color: black;
|
||||
}
|
||||
|
||||
#announce{
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
#main_menu .button:hover {
|
||||
color: orange;
|
||||
background-color: gray;
|
||||
}
|
||||
|
||||
tr:hover td{
|
||||
background-color: #160202;
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: black;
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.description img,
|
||||
#preview img{
|
||||
background: lightcyan;
|
||||
}
|
||||
584
legacy/src/main/resources/css/default/style.css
Normal file
584
legacy/src/main/resources/css/default/style.css
Normal file
@@ -0,0 +1,584 @@
|
||||
@font-face {
|
||||
font-family: "awesome";
|
||||
src: url("../fontawesome-webfont.woff");
|
||||
}
|
||||
*{
|
||||
max-width:100%;
|
||||
min-width:auto;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
}
|
||||
body{
|
||||
font-family: sans-serif;
|
||||
}
|
||||
code {
|
||||
display: inline-block;
|
||||
padding: 5px;
|
||||
margin: 5px 0;
|
||||
}
|
||||
textarea {
|
||||
min-height: 60px;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
textarea:hover{
|
||||
min-height: 400px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
input[type=text],input[type=email]{
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
td.connectors form input{
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
img#logo{
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
blockquote{
|
||||
font-style: italic;
|
||||
}
|
||||
#main_menu,
|
||||
#main_menu form{
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#main_menu .button {
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
margin-top: 7px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.hidden{
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.hover:hover .hidden{
|
||||
display: inherit !important;
|
||||
}
|
||||
|
||||
.emphasized{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.add_positions,
|
||||
.requirements{
|
||||
max-height: 60px;
|
||||
max-width: 66%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.add_positions:hover,
|
||||
.requirements:hover{
|
||||
max-height: 999999px;
|
||||
max-width: 999999px;
|
||||
}
|
||||
|
||||
.add_positions > ul > li{
|
||||
max-height: 20px;
|
||||
overflow: hidden;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.add_positions > ul > li:hover{
|
||||
max-height: 999999px;
|
||||
}
|
||||
|
||||
fieldset.add.document:hover {
|
||||
max-height: unset;
|
||||
}
|
||||
|
||||
fieldset.add.document {
|
||||
max-height: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
fieldset.options label,
|
||||
.add_positions label span,
|
||||
.poll_status label,
|
||||
.requirements label{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tasks .canceled a,
|
||||
.children .inactive,
|
||||
.requirements .inactive,
|
||||
.tasks .inactive{
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.tasks .navi a{
|
||||
display: inline-table;
|
||||
}
|
||||
|
||||
blockquote a,
|
||||
p a,
|
||||
.description a{
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
tr > *{
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
label.street:after,
|
||||
label.location::after {
|
||||
content: "\a ";
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.poll.evaluate table tr:nth-child(n+2) th,
|
||||
.poll.evaluate table td{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.poll .disabled{
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.company div > fieldset,
|
||||
.company > table{
|
||||
margin-right: 10px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
table.time h2{
|
||||
margin-right: 60px;
|
||||
}
|
||||
|
||||
.file label,
|
||||
.document .dates label{
|
||||
display: block
|
||||
}
|
||||
.document .header,
|
||||
.document .tags{
|
||||
clear: both;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border-radius: 10px;
|
||||
border-width: 1px;
|
||||
}
|
||||
|
||||
.contacts fieldset,
|
||||
.document .customer,
|
||||
.document .document_type,
|
||||
.document .sender,
|
||||
.document .court,
|
||||
.document .dates,
|
||||
.document .template,
|
||||
fieldset.del_note,
|
||||
fieldset.login_service_list,
|
||||
fieldset.userlist,
|
||||
fieldset.document.list{
|
||||
float: left;
|
||||
}
|
||||
|
||||
.document .dates label{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.button,
|
||||
input,
|
||||
button {
|
||||
border: 0 none;
|
||||
font-weight: bold;
|
||||
margin: 0 2px;
|
||||
padding: 3px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.change_state,
|
||||
td.connectors button[type="submit"],
|
||||
.prop_action,
|
||||
input[type="submit"] {
|
||||
clear: both;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.symbol{
|
||||
font-family: awesome;
|
||||
font-size: 20px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#main_menu .symbol{
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.right{
|
||||
float: right;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
.tasks .project {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.right-abs {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 5px;
|
||||
}
|
||||
.right-fix {
|
||||
position: fixed;
|
||||
right: 5px;
|
||||
top: 5px;
|
||||
}
|
||||
.hover {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-radius: 5px;
|
||||
max-height: 35px;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
|
||||
.hover:hover {
|
||||
max-height: unset;
|
||||
}
|
||||
|
||||
.hover_h > a:nth-child(n+2){
|
||||
display: none;
|
||||
}
|
||||
|
||||
.hover_h:hover {
|
||||
padding: 5px 0 20px;
|
||||
}
|
||||
|
||||
.hover_h:hover > a:nth-child(n+2){
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
form.document textarea {
|
||||
font-weight: bold;
|
||||
min-height: 90px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.pos_price,
|
||||
form.document input.price,
|
||||
form.document input.amount{
|
||||
max-width: 60px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
form.document .tax{
|
||||
min-width: 70px;
|
||||
}
|
||||
form.document .tax input{
|
||||
max-width: 40px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
td > h1{
|
||||
display: inline-block;
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
|
||||
.center,
|
||||
.infos,
|
||||
.errors,
|
||||
.warnings{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.infos span,
|
||||
.errors span,
|
||||
.warnings span{
|
||||
margin: 5px 0 0;
|
||||
padding: 5px;
|
||||
border-radius: 10px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tags span{
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
.bookmark .share,
|
||||
.bookmark .tags{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.bookmark form .share{
|
||||
height: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bookmark form .share:hover{
|
||||
height: initial;
|
||||
}
|
||||
|
||||
fieldset.bookmark > fieldset{
|
||||
max-height: 14px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
fieldset.bookmark > fieldset.tags{
|
||||
max-height: unset;
|
||||
}
|
||||
|
||||
fieldset.bookmark > fieldset:hover{
|
||||
max-height: unset;
|
||||
}
|
||||
.bookmark>fieldset>a{
|
||||
word-wrap: break-word;
|
||||
display: block;
|
||||
min-width: auto;
|
||||
}
|
||||
|
||||
.bookmark>fieldset>a.button{
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.copytext{
|
||||
position:fixed;
|
||||
width: 100px;
|
||||
left: -1000px;
|
||||
}
|
||||
|
||||
img[src*="pos=right"] {
|
||||
float:right;
|
||||
margin: 5px 0 5px 5px;
|
||||
}
|
||||
|
||||
img[src*="pos=left"] {
|
||||
float:left;
|
||||
margin: 5px 5px 5px 0;
|
||||
}
|
||||
|
||||
img[src*="width=100"]{
|
||||
max-width: 100px;
|
||||
}
|
||||
img[src*="width=200"]{
|
||||
max-width: 200px;
|
||||
}
|
||||
img[src*="width=300"]{
|
||||
max-width: 300px;
|
||||
}
|
||||
img[src*="width=400"]{
|
||||
max-width: 400px;
|
||||
}
|
||||
img[src*="width=500"]{
|
||||
max-width: 500px;
|
||||
}
|
||||
img[src*="width=600"]{
|
||||
max-width: 600px;
|
||||
}
|
||||
img[src*="width=700"]{
|
||||
max-width: 700px;
|
||||
}
|
||||
img[src*="width=800"]{
|
||||
max-width: 800px;
|
||||
}
|
||||
img[src*="width=900"]{
|
||||
max-width: 900px;
|
||||
}
|
||||
img[src*="width=50%"]{
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
img[src*="width=33%"]{
|
||||
max-width: 33%;
|
||||
}
|
||||
|
||||
img[src$="width=25%"]{
|
||||
max-width: 25%;
|
||||
}
|
||||
|
||||
#announce{
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
padding: 3px 5px 0;
|
||||
border-top-left-radius: 7px;
|
||||
}
|
||||
|
||||
fieldset.scrolling{
|
||||
overflow: scroll;
|
||||
max-height: 80%;
|
||||
}
|
||||
|
||||
svg#gantt{
|
||||
max-width: unset;
|
||||
}
|
||||
|
||||
svg .row{
|
||||
fill: none;
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
svg .row:hover{
|
||||
fill: #333333;
|
||||
}
|
||||
|
||||
svg .duration{
|
||||
fill:rgba(255,0,255,0.4);
|
||||
stroke:none;
|
||||
}
|
||||
|
||||
svg .schedule{
|
||||
fill:none;
|
||||
stroke-width:1;
|
||||
stroke: yellow;
|
||||
}
|
||||
|
||||
svg .start{
|
||||
stroke-dasharray: 10,30,40;
|
||||
}
|
||||
|
||||
svg .stop{
|
||||
stroke-dasharray: 50,30;
|
||||
}
|
||||
|
||||
svg text{
|
||||
stroke: none;
|
||||
fill: red;
|
||||
}
|
||||
|
||||
div.search{
|
||||
display: inline-block;
|
||||
max-width: 150px;
|
||||
}
|
||||
|
||||
div.search input,
|
||||
div.search label{
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.search:hover input,
|
||||
div.search:hover label{
|
||||
display: initial;
|
||||
}
|
||||
|
||||
.note td.code {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.note td.code textarea {
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
.project-index td .users{
|
||||
max-height: 30px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.project-index tr:hover td .users{
|
||||
max-height: none;
|
||||
}
|
||||
|
||||
.easylist fieldset a.button {
|
||||
width: 80%;
|
||||
padding: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#preview,
|
||||
#preview-source{
|
||||
display: inline-block;
|
||||
max-width: calc(50% - 20px);
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
table #preview,
|
||||
table #preview-source{
|
||||
display: inherit;
|
||||
max-width: unset;
|
||||
vertical-align: inherit;
|
||||
}
|
||||
|
||||
#preview.loading{
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
.completed > a::before {
|
||||
content: " ✓";
|
||||
}
|
||||
|
||||
@media (max-width:1199px) {
|
||||
*[hide="12"]{
|
||||
display: none;
|
||||
}
|
||||
table.document input{
|
||||
max-width: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px){
|
||||
*[hide="9"]{
|
||||
display: none;
|
||||
}
|
||||
table.document input{
|
||||
max-width: 60px;
|
||||
}
|
||||
table.document .tax input,
|
||||
table.document input.amount{
|
||||
max-width: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 800px){
|
||||
*[hide="8"]{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 700px){
|
||||
*[hide="7"]{
|
||||
display: none;
|
||||
}
|
||||
fieldset.bookmark > fieldset{
|
||||
max-height: 50px;
|
||||
}
|
||||
#preview,
|
||||
#preview-source{
|
||||
display: block;
|
||||
max-width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px){
|
||||
*[hide="6"]{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.easylist fieldset a.button {
|
||||
width: 60%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 500px){
|
||||
*[hide="5"]{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media (max-width: 400px){
|
||||
*[hide="4"]{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media print{
|
||||
fieldset.note span.right,
|
||||
#logo, #main_menu {
|
||||
display: none;
|
||||
}
|
||||
fieldset.process, fieldset.database{
|
||||
page-break-after: always;
|
||||
}
|
||||
.export>fieldset{
|
||||
border: 0 none;
|
||||
}
|
||||
}
|
||||
41
legacy/src/main/resources/css/default/svg_colors.css
Normal file
41
legacy/src/main/resources/css/default/svg_colors.css
Normal file
@@ -0,0 +1,41 @@
|
||||
.arrow{
|
||||
stroke: orange;
|
||||
}
|
||||
circle, ellipse, rect{
|
||||
stroke: black;
|
||||
}
|
||||
ellipse,
|
||||
circle.process{
|
||||
fill: rgba(255,255,255,0.5);
|
||||
}
|
||||
rect.terminal{
|
||||
fill: white;
|
||||
}
|
||||
circle.connector{
|
||||
fill: rgba(0,0,0,0.05);
|
||||
stroke: none;
|
||||
}
|
||||
circle.connector:hover{
|
||||
fill: rgba(0,0,0,0.6);
|
||||
}
|
||||
|
||||
#backdrop{
|
||||
fill: transparent;
|
||||
}
|
||||
|
||||
.arrow circle{
|
||||
stroke: none;
|
||||
fill: rgba(128,128,128,0.5);
|
||||
}
|
||||
.arrow text{
|
||||
fill: black;
|
||||
stroke: none;
|
||||
}
|
||||
|
||||
.arrow:hover circle{
|
||||
fill: rgba(255,0,0,0.3);
|
||||
}
|
||||
|
||||
.process text{
|
||||
fill: black;
|
||||
}
|
||||
@@ -132,7 +132,23 @@ public class StockModule extends BaseHandler implements StockService {
|
||||
yield super.doGet(path,ex);
|
||||
}
|
||||
}
|
||||
case null, default -> super.doGet(path,ex);
|
||||
case null -> super.doGet(path,ex);
|
||||
default -> {
|
||||
try {
|
||||
var id = Long.parseLong(head);
|
||||
Item item = stockDb.loadItem(id);
|
||||
Owner owner = item.owner().resolve();
|
||||
if (owner instanceof Company company) {
|
||||
if (!companyService().membership(company.id(),user.get().id())) throw forbidden("You are not allowed to access {0}",OBJECT);
|
||||
}
|
||||
if (owner instanceof UmbrellaUser u){
|
||||
if (u.id() != user.get().id()) throw forbidden("You are not allowed to access {0}",OBJECT);
|
||||
}
|
||||
yield sendContent(ex,item);
|
||||
} catch (NumberFormatException nfe){
|
||||
yield super.doGet(path,ex);
|
||||
}
|
||||
}
|
||||
};
|
||||
} catch (UmbrellaException e){
|
||||
return send(ex,e);
|
||||
|
||||
@@ -39,6 +39,7 @@ public class SqliteDb extends BaseDb implements TagDB{
|
||||
public SqliteDb(Connection tagDb, Connection bmDb) {
|
||||
super(tagDb);
|
||||
bookmarks = new de.srsoftware.umbrella.bookmarks.SqliteDb(bmDb);
|
||||
createTables();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
"saved": "gespeichert",
|
||||
"save_object": "{object} speichern",
|
||||
"search": "Suche",
|
||||
"searching…": "suche…",
|
||||
"select_company" : "Wählen Sie eine ihrer Firmen:",
|
||||
"select_customer": "Kunde auswählen",
|
||||
"select_property": "Eigenschaft auswählen",
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
"saved": "saved",
|
||||
"save_object": "save {object}",
|
||||
"search": "search",
|
||||
"searching…": "searhcing…",
|
||||
"select_company" : "select on of you companies:",
|
||||
"select_customer": "select customer",
|
||||
"select_property": "select property",
|
||||
|
||||
@@ -9,4 +9,5 @@ tasks.processResources {
|
||||
from("../frontend/dist") {
|
||||
into("web")
|
||||
}
|
||||
}
|
||||
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
||||
}
|
||||
|
||||
@@ -152,15 +152,27 @@ public class SqliteDb extends BaseDb implements WikiDb {
|
||||
@Override
|
||||
public Map<Long, WikiPage> find(long userId, List<String> keys, boolean fulltext) {
|
||||
try {
|
||||
var query = select(ALL).from(TABLE_PAGES).leftJoin(ID,TABLE_PAGES_USERS,PAGE_ID).where(USER_ID,equal(userId));
|
||||
for (var key : keys) query.where(TITLE,like("%"+key+"%"));
|
||||
var rs = query.exec(db);
|
||||
var map = new HashMap<Long,WikiPage>();
|
||||
while (rs.next()) {
|
||||
var page = WikiPage.of(rs);
|
||||
map.put(page.id(),page);
|
||||
{
|
||||
var query = select(ALL).from(TABLE_PAGES).leftJoin(ID, TABLE_PAGES_USERS, PAGE_ID).where(USER_ID, equal(userId));
|
||||
for (var key : keys) query.where(TITLE, like("%" + key.replaceAll("[ÄäÖöÜüß]", "%") + "%"));
|
||||
var rs = query.exec(db);
|
||||
while (rs.next()) {
|
||||
var page = WikiPage.of(rs);
|
||||
map.put(page.id(), page);
|
||||
}
|
||||
rs.close();
|
||||
}
|
||||
if (fulltext) {
|
||||
var query = select(ALL).from(TABLE_PAGES).leftJoin(ID, TABLE_PAGES_USERS, PAGE_ID).where(USER_ID, equal(userId));
|
||||
for (var key : keys) query.where(CONTENT, like("%" + key.replaceAll("[ÄäÖöÜüß]", "%") + "%"));
|
||||
var rs = query.exec(db);
|
||||
while (rs.next()) {
|
||||
var page = WikiPage.of(rs);
|
||||
map.put(page.id(), page);
|
||||
}
|
||||
rs.close();
|
||||
}
|
||||
rs.close();
|
||||
return map;
|
||||
} catch (SQLException e) {
|
||||
throw failedToSearchDb(t(WIKI_PAGES)).causedBy(e);
|
||||
|
||||
Reference in New Issue
Block a user