code improvements
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -83,5 +83,5 @@
|
||||
{#if editable && editing}
|
||||
<input bind:value={editValue} onkeyup={typed} autofocus />
|
||||
{:else}
|
||||
<svelte:element this={type} {onclick} {onmousedown} {onmouseup} {ontouchstart} {ontouchend} class={{editable}} title={t('double_click_to_edit')} >{value}</svelte:element>
|
||||
<svelte:element this={type} href="" {onclick} {onmousedown} {onmouseup} {ontouchstart} {ontouchend} class={{editable}} title={t('double_click_to_edit')} >{value}</svelte:element>
|
||||
{/if}
|
||||
|
||||
@@ -32,9 +32,10 @@ onMount(fetchModules);
|
||||
</style>
|
||||
|
||||
<nav>
|
||||
<a onclick={() => router.navigate('/user')}>{t('users')}</a>
|
||||
<a onclick={() => router.navigate('/document')}>{t('documents')}</a>
|
||||
<a onclick={() => router.navigate('/project')}>{t('projects')}</a>
|
||||
<a href="" onclick={() => router.navigate('/user')}>{t('users')}</a>
|
||||
<a href="" onclick={() => router.navigate('/project')}>{t('projects')}</a>
|
||||
<a href="" onclick={() => router.navigate('/task')}>{t('tasks')}</a>
|
||||
<a href="" onclick={() => router.navigate('/document')}>{t('documents')}</a>
|
||||
<a href="https://svelte.dev/tutorial/svelte/state" target="_blank">{t('tutorial')}</a>
|
||||
{#each modules as module,i}<a href={module.url}>{module.name}</a>{/each}
|
||||
{#if user.name }
|
||||
|
||||
@@ -85,8 +85,8 @@
|
||||
<tbody>
|
||||
{#each sortedProjects as project}
|
||||
<tr>
|
||||
<td class="name" onclick={() => show(project.id)} >
|
||||
{project.name}
|
||||
<td class="name">
|
||||
<a href="" onclick={() => show(project.id)}>{project.name}</a>
|
||||
</td>
|
||||
<td class="company" onclick={() => show(project.id)} >
|
||||
{#if project.company_id && companies[project.company_id]}
|
||||
@@ -94,6 +94,7 @@
|
||||
{/if}
|
||||
</td>
|
||||
<td class="state" onclick={() => show(project.id)} >
|
||||
|
||||
{t("state_"+project.status.name.toLowerCase())}
|
||||
</td>
|
||||
<td class="members" onclick={() => show(project.id)} >
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
|
||||
{#if !deleted}
|
||||
<li class="task {task.status.name.toLowerCase()}">
|
||||
<LineEditor bind:value={task.name} onclick={openTask} editable={true} onSet={setName} type="span" />
|
||||
<LineEditor bind:value={task.name} onclick={openTask} editable={true} onSet={setName} type="a" />
|
||||
{#if task.estimated_time}
|
||||
<span class="estimated_time">({+task.estimated_time} h)</span>
|
||||
{/if}
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
{#if project}
|
||||
<tr>
|
||||
<th>{t('project')}</th>
|
||||
<td class="project" onclick={gotoProject}>{project.name}</td>
|
||||
<td class="project"><a href="" onclick={gotoProject}>{project.name}</a></td>
|
||||
</tr>
|
||||
{/if}
|
||||
{#if task.parent}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
a {
|
||||
color: orange;
|
||||
text-decoration: none;
|
||||
}
|
||||
body {
|
||||
font-family: sans;
|
||||
@@ -83,20 +84,20 @@ td, tr{
|
||||
background: rgba(0,0,0,0.7);
|
||||
backdrop-filter: blur(3px);
|
||||
}
|
||||
.task.cancelled > span {
|
||||
.task.cancelled > a {
|
||||
text-decoration: line-through;
|
||||
color: gray;
|
||||
}
|
||||
.task.started > span {
|
||||
.task.started > a {
|
||||
color: chartreuse;
|
||||
}
|
||||
.task.pending > span {
|
||||
.task.pending > a {
|
||||
color: gray;
|
||||
}
|
||||
.task.complete > span {
|
||||
.task.complete > a {
|
||||
color: forestgreen;
|
||||
}
|
||||
.task.complete > span:before {
|
||||
.task.complete > a:before {
|
||||
content: "✓ ";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user