Bugzilla – Attachment 113751 Details for
Bug 26938
Prevent flash of unstyled content on sales table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26938: Prevent flash of unstyled sales table
Bug-26938-Prevent-flash-of-unstyled-sales-table.patch (text/plain), 2.31 KB, created by
Josef Moravec
on 2020-11-17 17:57:24 UTC
(
hide
)
Description:
Bug 26938: Prevent flash of unstyled sales table
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2020-11-17 17:57:24 UTC
Size:
2.31 KB
patch
obsolete
>From 373aa8875b52a6afa26a693a50073b5c2b6c499a Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 3 Nov 2020 09:47:12 +0000 >Subject: [PATCH] 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> >--- > koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss | 4 ++++ > koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt | 3 +++ > 2 files changed, 7 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index f72cf40720..4b243ca1e9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -1320,6 +1320,10 @@ div { > padding: 1em; > } > >+#sales { >+ display: none; >+} >+ > .tip { > color: #808080; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >index d7dee6757a..aad75188c3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt >@@ -386,6 +386,9 @@ > .append( '<td><button class="printReceipt btn btn-default btn-xs" data-accountline="'+group+'"><i class="fa fa-print"></i> ' + _("Print receipt") + '</button></td>'); > }, > endRender: null, >+ }, >+ initComplete: function() { >+ $("#sales").show(); > } > })); > >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26938
:
113115
|
113218
| 113751