-
Notifications
You must be signed in to change notification settings - Fork 1
Small polish #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Small polish #2
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,12 +2,8 @@ | |
| <div class="position" th:classappend="${'rank' + teamStat.index}"> | ||
| <div class="team"> | ||
| <div th:text="${teamStat.index + 1}"></div> | ||
| <th:block th:if="${team.editMode == true}"> | ||
| <div th:insert="fragments :: editTeam" th:remove="tag"/> | ||
| </th:block> | ||
| <th:block th:if="${team.editMode == false}"> | ||
| <div th:insert="fragments :: showTeam" th:remove="tag"/> | ||
| </th:block> | ||
| <div th:if="${team.editMode}" th:insert="~{fragments :: editTeam}" th:remove="tag"/> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hattest du das ausprobiert? Ich habe (irgendwo bei SO) gelesen, dass aus Gründen ein insert eine höhere Präzedenz als ein if hat. 🤷 |
||
| <div th:if="${not team.editMode}" th:insert="~{fragments :: showTeam}" th:remove="tag"/> | ||
| <div class="editButton" hx:post="|/edit/${team.id}|" hx-swap="innerHTML" hx-target="#soccer-table"> | ||
| <svg | ||
| xmlns="http://www.w3.org/2000/svg" | ||
|
|
@@ -34,14 +30,16 @@ | |
|
|
||
| <div th:fragment="soccer-table" th:remove="tag"> | ||
|
|
||
| <div th:insert="fragments :: position(${team})" th:each="team : ${soccerTable.positions}" th:remove="tag"> | ||
| <div th:insert="~{fragments :: position(${team})}" th:each="team : ${soccerTable.positions}" th:remove="tag"> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh! Tilde! Was tut das? |
||
| </div> | ||
|
|
||
| </div> | ||
|
|
||
| <div th:fragment="editTeam" th:remove="tag"> | ||
| <input name='teamName' th:value="${team.name}" form="edit-soccer-table"/> | ||
| <input type='hidden' name='teamId' th:value="${team.id}" form="edit-soccer-table"/> | ||
| <form id="edit-soccer-table" hx-post="/saveSingleTeam" hx-swap="innerHTML" hx-target="#soccer-table"> | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dann habe ich doch nested Forms, oder? Das wollte ich verhindern mit dem Auslagern nach oben. |
||
| <input name='teamName' th:value="${team.name}"/> | ||
| <input type='hidden' name='teamId' th:value="${team.id}"/> | ||
| </form> | ||
| </div> | ||
|
|
||
| <div th:fragment="showTeam" th:text="${team.name}">FC Wolfsburg</div> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,12 +8,17 @@ | |
| <body> | ||
| <div class="app"> | ||
| <h1>Kickertabelle zum Selberstecken</h1> | ||
| <form id="edit-soccer-table" hx-post="/saveSingleTeam" hx-swap="innerHTML" hx-target="#soccer-table"></form> | ||
|
|
||
| <form id="soccer-table" class="soccer-table sortable" hx-post="/soccerTable" hx-trigger="end" hx-swap="innerHTML" | ||
| <form id="soccer-table" | ||
| class="soccer-table sortable" | ||
| hx-post="/soccerTable" | ||
| hx-trigger="end" | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Jo! Nice! |
||
| hx-swap="innerHTML" | ||
| th:remove="all-but-first"> | ||
|
|
||
| <div th:insert="fragments :: position(${team})" th:each="team : ${soccerTable.positions}" th:remove="tag"> | ||
| <div th:insert="~{fragments :: position(${team})}" | ||
| th:each="team : ${soccerTable.positions}" | ||
| th:remove="tag"> | ||
| </div> | ||
| </form> | ||
| </div> | ||
|
|
@@ -34,4 +39,4 @@ <h1>Kickertabelle zum Selberstecken</h1> | |
| </script> | ||
|
|
||
|
|
||
| </html> | ||
| </html> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh! Ich hatte doch schon die Dev-Tools! Oder muss ich da noch mehr machen? Erkennt intellij das automatisch? Oder macht Gradle da was?
(Das hatte bei mir bislang keinen merkbaren Einfluss)