Feature/row highlight clean - #215
Open
Avatarsia wants to merge 6 commits into
Open
Conversation
Avatarsia
commented
Dec 12, 2025
Contributor
- Ziel: Markierte Belege sofort erkennbar machen.
- Umgesetzt: Markierte Angebote/Aufträge/Rechnungen werden beim Setzen der Checkbox mit einem Hintergrund hervorgehoben; auch nach DataTables-Init gesichert.
- Erwartetes Verhalten: Selektierte Zeilen heben sich optisch ab, Selektionsstatus bleibt nach Tabellen-Reload bestehen.
exciler
approved these changes
Mar 2, 2026
Avatarsia
force-pushed
the
feature/row-highlight-clean
branch
2 times, most recently
from
May 7, 2026 20:04
6e0d5e1 to
0c4c1fd
Compare
Contributor
Author
|
Force-Push-Hinweis: Branch wurde direkt auf Bestehende Inline-Kommentare auf alten SHAs erscheinen jetzt als „outdated" — gerne nochmal kommentieren auf den neuen Commits, falls noch was offen ist. |
Avatarsia
force-pushed
the
feature/row-highlight-clean
branch
from
May 20, 2026 10:10
6e49cb0 to
772dc2c
Compare
Avatarsia
force-pushed
the
feature/row-highlight-clean
branch
from
July 26, 2026 10:03
772dc2c to
c34b0ad
Compare
Two new rules at the end of datatables_custom.css:
- tbody tr:nth-child(even) -> #f7f9fb (very light blue tint)
- tbody tr:nth-child(4n) -> #eef3f8 (slightly deeper, since 4n is
also even; later definition wins)
Improves readability on long DataTables-rendered lists. Marked rows
(.row-marked) keep priority via the existing !important rules above,
so the manual checkbox highlight stays visible regardless of stripe
position.
…not override User reported the striping had no visible effect. Cause: the OpenXE theme stylesheet (themes/new/css/styles.css) sets explicit white backgrounds on table tr/td which beats the nth-child selectors without !important. Added !important to both stripe rules and added a third selector (.dataTables_wrapper tbody tr) to cover tables that DataTables wraps but doesn't directly class as .dataTable. .row-marked still wins because its selector specificity is higher, and CSS rules at equal !important fall back to specificity.
…city Earlier attempt used 'table.dataTable tbody tr:nth-child(even) td' which loses the cascade against the OpenXE theme rule '.dataTables_wrapper table.dataTable.display > tbody > tr > td' (more classes + combinators). Even !important does not help because at equal importance, specificity decides. Verified directly against the live tree (Avatarsia 192.168.0.150) via DOM/getComputedStyle: DataTables sets class='odd' / class='even' on the data rows. Targeting tr.even with the same wrapper-prefix as the theme rule wins specificity; the 4n stripe matches DOM 4n-positions (.even rows at indexes 3, 7, 11, ... → effectively every 4th data row).
Bug-Reports vom User auf Avatarsia/192.168.0.150:
1. Markieren funktioniert auf "dunkleren" Zeilen (jede 4.) nicht.
2. Manche markierte Zeilen sehen aus wie "zwei Hintergruende".
Diagnose (verifiziert mit Codex):
- Spezifitaet table.dataTable tbody tr.row-marked td = (0,2,4)
- Spezifitaet .dataTables_wrapper table.dataTable.display
> tbody > tr.even > td = (0,4,4)
- Spezifitaet .dataTables_wrapper ... > tr.even:nth-child(4n)
> td = (0,5,4)
Bei gleichem !important entscheidet die Spezifitaet -> Stripe-Regeln
gewinnen ueber .row-marked. Der bisherige Code-Kommentar ("equal class
count + later defined") war falsch.
Zusaetzlich: DataTables setzt eigene td.sorting_1/_2/_3 Klassen auf der
sortierten Spalte mit Spezifitaet (0,4,4) und eigener Hintergrundfarbe,
wodurch die sortierte Zelle in markierten Zeilen aus der Reihe taenzt
("zwei Hintergruende"-Effekt).
Fix:
- Stripe-Regeln per :not(.row-marked) ausschliessen, sodass markierte
Zeilen gar nicht erst gestriped werden. Damit muss .row-marked nicht
mehr im Spezifitaets-Wettbewerb gewinnen.
- Override-Regel fuer td.sorting_1/_2/_3 in .row-marked Zeilen mit
Wrapper-Pfad (Spezifitaet 0,5,4), damit die sortierte Spalte den
einheitlichen Highlight bekommt.
Avatarsia
force-pushed
the
feature/row-highlight-clean
branch
from
July 28, 2026 10:17
c34b0ad to
7c50213
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.