Bug 27792 - Improve jEditable configuration for point of sale fields
Summary: Improve jEditable configuration for point of sale fields
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-25 12:08 UTC by Owen Leonard
Modified: 2021-12-13 21:08 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch improves interactions with inline-editable fields in the Point of Sale interface to prevent jumpy table re-draws and to enforce the required currenty/number input types.
Version(s) released in:
21.05.00,20.11.04


Attachments
Bug 27792: Improve jEditable configuration for point of sale fields (2.69 KB, patch)
2021-02-25 12:22 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27792: Improve jEditable configuration for point of sale fields (2.76 KB, patch)
2021-02-25 13:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27792: (follow-up) Double escape the escape (1.09 KB, patch)
2021-02-25 13:56 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 27792: Improve jEditable configuration for point of sale fields (2.81 KB, patch)
2021-02-28 17:05 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27792: (follow-up) Double escape the escape (1.15 KB, patch)
2021-02-28 17:05 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-02-25 12:08:20 UTC
We can leverage some jEditable configuration options to improve the behavior of the inline-editable fields in the Point of Sale interface:

 - Reduce field with to reduce jumpy table re-draws.
 - Replace "numeric" input type with "text"
 - Add pattern attribute for enforcing currency/number entry

Unfortunately jEditable doesn't seem to have an option to add an "inputmode" attribute.
Comment 1 Owen Leonard 2021-02-25 12:22:59 UTC
Created attachment 117306 [details] [review]
Bug 27792: Improve jEditable configuration for point of sale fields

This patch alters the configuration of the "cost" and "quantity"
editable fields in the "This sale" table on the Point of Sale page:

 - Reduce field with to reduce jumpy table re-draws.
 - Replace "numeric" input type with "text"
 - Add pattern attribute for enforcing currency/number entry

To test you must have EnablePointOfSale and UseCashRegisters enabled and
configured.

 - Apply the patch and go to the Point of Sale page.
 - Add some items for purchase.
 - In the "This sale" table, click the values in the "cost" and
   "quantity" columns and try editing their values.
 - The form field which appears should not fill the width of the table
   column.
 - The fields should enforce the correct input: Currency for the "cost"
   column, digits for the "quantity" column.
 - The fields should update when you click out of them and the correct
   values should appear in the "Collect payment" area.
Comment 2 Martin Renvoize 2021-02-25 13:56:55 UTC
Created attachment 117324 [details] [review]
Bug 27792: Improve jEditable configuration for point of sale fields

This patch alters the configuration of the "cost" and "quantity"
editable fields in the "This sale" table on the Point of Sale page:

 - Reduce field with to reduce jumpy table re-draws.
 - Replace "numeric" input type with "text"
 - Add pattern attribute for enforcing currency/number entry

To test you must have EnablePointOfSale and UseCashRegisters enabled and
configured.

 - Apply the patch and go to the Point of Sale page.
 - Add some items for purchase.
 - In the "This sale" table, click the values in the "cost" and
   "quantity" columns and try editing their values.
 - The form field which appears should not fill the width of the table
   column.
 - The fields should enforce the correct input: Currency for the "cost"
   column, digits for the "quantity" column.
 - The fields should update when you click out of them and the correct
   values should appear in the "Collect payment" area.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2021-02-25 13:56:58 UTC
Created attachment 117325 [details] [review]
Bug 27792: (follow-up) Double escape the escape

The JSON patturn wasn't getting interpreted correctly for me.. the `\`
characters needed escaping with a second `\`.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Katrin Fischer 2021-02-28 17:05:27 UTC
Created attachment 117412 [details] [review]
Bug 27792: Improve jEditable configuration for point of sale fields

This patch alters the configuration of the "cost" and "quantity"
editable fields in the "This sale" table on the Point of Sale page:

 - Reduce field with to reduce jumpy table re-draws.
 - Replace "numeric" input type with "text"
 - Add pattern attribute for enforcing currency/number entry

To test you must have EnablePointOfSale and UseCashRegisters enabled and
configured.

 - Apply the patch and go to the Point of Sale page.
 - Add some items for purchase.
 - In the "This sale" table, click the values in the "cost" and
   "quantity" columns and try editing their values.
 - The form field which appears should not fill the width of the table
   column.
 - The fields should enforce the correct input: Currency for the "cost"
   column, digits for the "quantity" column.
 - The fields should update when you click out of them and the correct
   values should appear in the "Collect payment" area.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Katrin Fischer 2021-02-28 17:05:31 UTC
Created attachment 117413 [details] [review]
Bug 27792: (follow-up) Double escape the escape

The JSON patturn wasn't getting interpreted correctly for me.. the `\`
characters needed escaping with a second `\`.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Jonathan Druart 2021-03-01 14:24:30 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 7 Fridolin Somers 2021-03-04 10:44:49 UTC
Small enhancement, I choose to backport.

Pushed to 20.11.x for 20.11.04
Comment 8 Andrew Fuerste-Henry 2021-03-14 18:30:29 UTC
Enhancement, not backporting to 20.05