-
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
Conversation
- fix Thymeleaf deprecation warning regarding fragment reference - remove obsolete (?) th:block element - simplify boolean expression in th:if (remove '== true') - move form element for editing team to fragment - put attributes on separate lines
| <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"/> |
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.
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: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"> |
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! Tilde! Was tut das?
| <form id="soccer-table" | ||
| class="soccer-table sortable" | ||
| hx-post="/soccerTable" | ||
| hx-trigger="end" |
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.
Jo! Nice!
Gibt es prettier drüben bei euch? Ok Fangfrage! 😁
| <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"> |
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.
Dann habe ich doch nested Forms, oder? Das wollte ich verhindern mit dem Auslagern nach oben.
| implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8") | ||
| implementation("io.github.wimdeblauwe:htmx-spring-boot-thymeleaf:2.0.0") | ||
| implementation("org.springframework.boot:spring-boot-devtools") | ||
| developmentOnly("org.springframework.boot:spring-boot-devtools") |
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)
No description provided.