Bugzilla – Attachment 114489 Details for
Bug 27256
"Add" button on point of sale page fails on table paging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27256: Update click handler for point of sale
Bug-27256-Update-click-handler-for-point-of-sale.patch (text/plain), 2.00 KB, created by
Owen Leonard
on 2020-12-17 19:14:46 UTC
(
hide
)
Description:
Bug 27256: Update click handler for point of sale
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-12-17 19:14:46 UTC
Size:
2.00 KB
patch
obsolete
>From a49806bcba8794aae87f32c664a98cabe35e2a37 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 16 Dec 2020 19:26:11 +0000 >Subject: [PATCH] Bug 27256: Update click handler for point of sale > >This patch updates the click handler to bind to the table element in the >DOM as aposed to the individual buttons by their classes. We then use >the event propogation and filter on the button class to catch the clicks >we want. > >Test plan >1/ Add 22 debit_types that can be sold to the system (or reduce the >datatable paging size) >2/ Confirm that items on the second page of results cannot be added for >sale on the point of sale page. >3/ Apply the patch >4/ Confirm items from the second table page can now be added correctly >5/ Clicking add when navigating to such an item should leave the items >table unmodified. >6/ Clicking aa when the table was filtered should reset the filters >bringing the table back to the first page >7/ Signoff > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >index d57f97637f..8da966b6a2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt >@@ -342,10 +342,12 @@ > "aaSorting": [[ 0, "asc" ]], > }, items_columns_settings, false); > >- $(".add_button").on("click", function(e) { >+ $("#invoices").on("click", ".add_button", function(e) { > e.preventDefault(); > fnClickAddRow(sale_table, $( this ).data('invoiceCode'), $( this ).data('invoiceTitle'), $( this ).data('invoicePrice') ); >- items_table.fnFilter( '' ); >+ if($('#invoices_filter').find('input[type=search]').val() !== ''){ >+ items_table.fnFilter( '' ); >+ } > }); > > // Change calculation and modal >-- >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 27256
:
114463
|
114489
|
114490
|
114558