editing inline in table by direct request
This commit is contained in:
@@ -75,6 +75,17 @@
|
||||
</ul>
|
||||
<div class="tabdivblurred tab-content">
|
||||
<div id="div_list" class="tab-pane active tab-pane-table">
|
||||
<script th:inline="javascript">
|
||||
function submitDropdown(field) {
|
||||
const value = field.value;
|
||||
const id = field.getAttribute("data-id");
|
||||
const fld = field.getAttribute("data-field");
|
||||
|
||||
const url_prefix = /*[[@{/done/update/}]]*/ "#";
|
||||
const url = url_prefix + id + "?field=" + fld + "&value=" + value;
|
||||
window.location.href = url;
|
||||
}
|
||||
</script>
|
||||
<table class="table table-striped table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -108,15 +119,24 @@
|
||||
<td><a class="hoverlink" th:href="@{/done/edit/{id}(id=${done.pk})}">
|
||||
<span th:text="${done.timeDiff}"></span>
|
||||
</a></td>
|
||||
<td><a class="hoverlink" th:href="@{/done/edit/{id}(id=${done.pk})}">
|
||||
<span class="boldtext" th:text="${done.project?.name}"></span>
|
||||
</a></td>
|
||||
<td><a class="hoverlink" th:href="@{/done/edit/{id}(id=${done.pk})}">
|
||||
<span class="boldtext" th:text="${done.module?.name}"></span>
|
||||
</a></td>
|
||||
<td><a class="hoverlink" th:href="@{/done/edit/{id}(id=${done.pk})}">
|
||||
<span class="boldtext" th:text="${done.activity?.name}"></span>
|
||||
</a></td>
|
||||
<td>
|
||||
<select onchange="submitDropdown(this)" th:data-id="${done.pk}" data-field="project">
|
||||
<option value="">---</option>
|
||||
<option th:each="p : ${projectList}" th:value="${p.pk}" th:text="${p.name}" th:selected="${done.project?.name == p.name ? 'selected' : 'false'}"></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select onchange="submitDropdown(this)" th:data-id="${done.pk}" data-field="module">
|
||||
<option value="">---</option>
|
||||
<option th:each="m : ${moduleList}" th:value="${m.pk}" th:text="${m.name}" th:selected="${done.module?.name == m.name ? 'selected' : 'false'}"></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select onchange="submitDropdown(this)" th:data-id="${done.pk}" data-field="job">
|
||||
<option value="">---</option>
|
||||
<option th:each="j : ${jobList}" th:value="${j.pk}" th:text="${j.name}" th:selected="${done.activity?.name == j.name ? 'selected' : 'false'}"></option>
|
||||
</select>
|
||||
</td>
|
||||
<td><span th:text="${done.billing.shortcut}" th:class="'billing ' + ${done.billing.csskey}" th:if="${done.billing != null}"></span></td>
|
||||
<td><a class="btn-list" th:href="@{/done/copy/{id}(id=${done.pk})}" title="Aufgabe neu beginnen"><i class="fa fa-copy"></i></a>
|
||||
<a class="btn-list" th:href="@{/done/edit/{id}(id=${done.pk})}" title="Eintrag bearbeiten"><i class="fa fa-edit"></i></a>
|
||||
|
||||
Reference in New Issue
Block a user