The rowGroup datatables plugin used in the register details page for transaction groups is having it's header row background styling overridden by local css for the case where the row is 'odd'.
Created attachment 119936 [details] Screenshot highlighting problem
How is it supposed to look?
Ooops.. I cut of the text in my screenshot.. the first and second arrow rows are incorrect.. the third arrow points out the correct darker background colour. i.e. we should continue to do our even/odd row highlighting.. but on top of that if it's a 'header row for a group' we should allow that to take precedence and take the darker third shade.
Created attachment 119951 [details] [review] Bug 28187: Make debit/credit row headers correct color To test: -Enable POS -Create a register and make some transactions. -Have both debits and credits -Have some older tranactions so you can look at the past_sales table. -Apply patch and regenerate the staff CSS: (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface) -Look at the sales and past_sales table. -Make sure each row header is the darker shade of gray (#e0e0e0)
Created attachment 119998 [details] [review] Bug 28187: Make debit/credit row headers correct color To test: -Enable POS -Create a register and make some transactions. -Have both debits and credits -Have some older tranactions so you can look at the past_sales table. -Apply patch and regenerate the staff CSS: (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface) -Look at the sales and past_sales table. -Make sure each row header is the darker shade of gray (#e0e0e0) Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Whilst this does fix the immediate issue, I was hoping to fix it at a higher level so subsequent uses of the rowGrouping plugin don't suffer the same problem. The problem I was having is that I couldn't find where in our css source files the background color was coming from.
Indeed.. still stuck How does the following rule get generated: tbody tr:nth-child(odd) td:not(.bg-danger):not(.bg-warning):not(.bg-info):not(.bg-success):not(.bg-primary) { background-color: #f9f9f9; } and why does it take precedence over table.dataTable tr.dtrg-group td { background-color: #e0e0e0; }
The rowGroup plugin is also used for checkouts I believe.. which is a shared include in a number of templates.. so yeah.. I do still feel we need a higher level fix. Sorry Lucas, thanks for working on it.
Created attachment 120956 [details] [review] Bug 28187: Exclude dtrg-group from row striping. The odd row lowlighting stripe effect added to datatales wasn't accounting for classes introduced by the rowGroup plugin to denote grouping header rows. This patch adds the required exclusion rule to properly highlight rowGroup grouping rows. Test plan 1/ Enable POS 2/ Create a register and make some transactions. 3/ Have both debits and credits 4/ Have some older tranactions so you can look at the past_sales table. 5/ Apply patch and regenerate the staff CSS: (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface) 6/ Look at the sales and past_sales table. 7/ Make sure each row header is the darker shade of gray (#e0e0e0) 7a/ You will need to have made some transactions with even and odd numbers of items in the sale highlight the problem before applying the patch 7b/ The rowGroup plugin is also used for the checkouts table and this patch should also fix that case.
I've come up with an alternate solution now that catches the cases more widely.. back to NSO.. not sure why it took me so long to wrap my brain around that!
Created attachment 120962 [details] [review] Bug 28187: Exclude dtrg-group from row striping. The odd row lowlighting stripe effect added to datatales wasn't accounting for classes introduced by the rowGroup plugin to denote grouping header rows. This patch adds the required exclusion rule to properly highlight rowGroup grouping rows. Test plan 1/ Enable POS 2/ Create a register and make some transactions. 3/ Have both debits and credits 4/ Have some older tranactions so you can look at the past_sales table. 5/ Apply patch and regenerate the staff CSS: (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface) 6/ Look at the sales and past_sales table. 7/ Make sure each row header is the darker shade of gray (#e0e0e0) 7a/ You will need to have made some transactions with even and odd numbers of items in the sale highlight the problem before applying the patch 7b/ The rowGroup plugin is also used for the checkouts table and this patch should also fix that case. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
> 7b/ The rowGroup plugin is also used for the checkouts table and > this patch should also fix that case. Where is that? http://localhost:8081/cgi-bin/koha/members/moremember.pl?borrowernumber=XXX http://localhost:8081/cgi-bin/koha/circ/circulation.pl?borrowernumber=XXXX ? Is there anything wrong? https://wtf.roflcopter.fr/pics/gallery#vzlK8k2u/lgCojF0C.png,pjbLuxYq/d6NnmVoS.png
Meanwhile, the main stuff works :D
Created attachment 121104 [details] [review] Bug 28187: Exclude dtrg-group from row striping. The odd row lowlighting stripe effect added to datatales wasn't accounting for classes introduced by the rowGroup plugin to denote grouping header rows. This patch adds the required exclusion rule to properly highlight rowGroup grouping rows. Test plan 1/ Enable POS 2/ Create a register and make some transactions. 3/ Have both debits and credits 4/ Have some older tranactions so you can look at the past_sales table. 5/ Apply patch and regenerate the staff CSS: (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_interface) 6/ Look at the sales and past_sales table. 7/ Make sure each row header is the darker shade of gray (#e0e0e0) 7a/ You will need to have made some transactions with even and odd numbers of items in the sale highlight the problem before applying the patch 7b/ The rowGroup plugin is also used for the checkouts table and this patch should also fix that case. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 21.05, thanks to everybody involved!
note: was backported to oldstable (20.11.x)
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.