Bug 26938: Prevent flash of unstyled sales table
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 3 Nov 2020 09:47:12 +0000 (09:47 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 18 Nov 2020 08:34:48 +0000 (09:34 +0100)
commit258d475d5f4bb306496dc90b9c602fd776a6c545
tree18cf948ecb29ddb3ea7fc88c3550dac166ee5d7b
parent836d9a38727859f06902a7be6790592431fe812e
Bug 26938: Prevent flash of unstyled sales table

On the registers page the table has come complex data structures
embedded to allow for all the functionality we bring into the datatable.

We should hide the table on page load and only display it at DataTables
init time once the weird content has been beautified by DataTables.

Test plan
1/ Enable 'UseCashRegisters' and 'EnablePointOfSale'
2/ Add a cash register and make some transactions against it.
3/ Navigate to the 'Register details' page
4/ Note that some 'funky' JSON strings appear in the table briefly
before it is restyled when DataTables loads.
5/ Apply the patch
6/ Rebuild the CSS from the SCSS files
7/ Reload the page (hard reload to get the CSS changes)
8/ Note that the table now only appears once the nice formatting that
DataTables adds is applied.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt