code improvements
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -83,5 +83,5 @@
|
|||||||
{#if editable && editing}
|
{#if editable && editing}
|
||||||
<input bind:value={editValue} onkeyup={typed} autofocus />
|
<input bind:value={editValue} onkeyup={typed} autofocus />
|
||||||
{:else}
|
{: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}
|
{/if}
|
||||||
|
|||||||
@@ -32,12 +32,13 @@ onMount(fetchModules);
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<a onclick={() => router.navigate('/user')}>{t('users')}</a>
|
<a href="" onclick={() => router.navigate('/user')}>{t('users')}</a>
|
||||||
<a onclick={() => router.navigate('/document')}>{t('documents')}</a>
|
<a href="" onclick={() => router.navigate('/project')}>{t('projects')}</a>
|
||||||
<a 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>
|
<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}
|
{#each modules as module,i}<a href={module.url}>{module.name}</a>{/each}
|
||||||
{#if user.name }
|
{#if user.name }
|
||||||
<a onclick={logout}>{t('logout')}</a>
|
<a onclick={logout}>{t('logout')}</a>
|
||||||
{/if}
|
{/if}
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@@ -85,15 +85,16 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{#each sortedProjects as project}
|
{#each sortedProjects as project}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="name" onclick={() => show(project.id)} >
|
<td class="name">
|
||||||
{project.name}
|
<a href="" onclick={() => show(project.id)}>{project.name}</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="company" onclick={() => show(project.id)} >
|
<td class="company" onclick={() => show(project.id)} >
|
||||||
{#if project.company_id && companies[project.company_id]}
|
{#if project.company_id && companies[project.company_id]}
|
||||||
{companies[project.company_id].name}
|
{companies[project.company_id].name}
|
||||||
{/if}
|
{/if}
|
||||||
</td>
|
</td>
|
||||||
<td class="state" onclick={() => show(project.id)} >
|
<td class="state" onclick={() => show(project.id)} >
|
||||||
|
|
||||||
{t("state_"+project.status.name.toLowerCase())}
|
{t("state_"+project.status.name.toLowerCase())}
|
||||||
</td>
|
</td>
|
||||||
<td class="members" onclick={() => show(project.id)} >
|
<td class="members" onclick={() => show(project.id)} >
|
||||||
@@ -115,4 +116,4 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{/if}
|
{/if}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
|
|
||||||
{#if !deleted}
|
{#if !deleted}
|
||||||
<li class="task {task.status.name.toLowerCase()}">
|
<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}
|
{#if task.estimated_time}
|
||||||
<span class="estimated_time">({+task.estimated_time} h)</span>
|
<span class="estimated_time">({+task.estimated_time} h)</span>
|
||||||
{/if}
|
{/if}
|
||||||
@@ -116,4 +116,4 @@
|
|||||||
<TaskList tasks={children} {estimated_time} {show_closed} />
|
<TaskList tasks={children} {estimated_time} {show_closed} />
|
||||||
{/if}
|
{/if}
|
||||||
</li>
|
</li>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
{#if project}
|
{#if project}
|
||||||
<tr>
|
<tr>
|
||||||
<th>{t('project')}</th>
|
<th>{t('project')}</th>
|
||||||
<td class="project" onclick={gotoProject}>{project.name}</td>
|
<td class="project"><a href="" onclick={gotoProject}>{project.name}</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/if}
|
{/if}
|
||||||
{#if task.parent}
|
{#if task.parent}
|
||||||
@@ -300,4 +300,4 @@
|
|||||||
<div class="notes">
|
<div class="notes">
|
||||||
<h3>{t('notes')}</h3>
|
<h3>{t('notes')}</h3>
|
||||||
<Notes module="task" entity_id={id} />
|
<Notes module="task" entity_id={id} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
a {
|
a {
|
||||||
color: orange;
|
color: orange;
|
||||||
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
font-family: sans;
|
font-family: sans;
|
||||||
@@ -83,20 +84,20 @@ td, tr{
|
|||||||
background: rgba(0,0,0,0.7);
|
background: rgba(0,0,0,0.7);
|
||||||
backdrop-filter: blur(3px);
|
backdrop-filter: blur(3px);
|
||||||
}
|
}
|
||||||
.task.cancelled > span {
|
.task.cancelled > a {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
.task.started > span {
|
.task.started > a {
|
||||||
color: chartreuse;
|
color: chartreuse;
|
||||||
}
|
}
|
||||||
.task.pending > span {
|
.task.pending > a {
|
||||||
color: gray;
|
color: gray;
|
||||||
}
|
}
|
||||||
.task.complete > span {
|
.task.complete > a {
|
||||||
color: forestgreen;
|
color: forestgreen;
|
||||||
}
|
}
|
||||||
.task.complete > span:before {
|
.task.complete > a:before {
|
||||||
content: "✓ ";
|
content: "✓ ";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,4 +231,4 @@ textarea{
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
color: orange;
|
color: orange;
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user