Bug 14011: Triggering slip print with enter key collides with 'barcode submitted'

To reproduce:

- Log into staff client
- Find a client with 0 checkouts
- Print a slip (or cancel printing it)
- Attempt to type in a barcode to checkout
  -- annoying modal screen pops up
     'barcode submitted' message will be triggered each time
     you try

To test:
- apply patch
- try to reproduce issue

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Marc Véron 2015-04-19 20:24:05 +02:00 committed by Tomas Cohen Arazi
parent 0e74f03706
commit da36c55bb2

View file

@ -69,13 +69,14 @@ function toggle_onsite_checkout(){
$(document).ready(function() {
$('#mainform').on('submit',function() {
$('#barcode').on('keypress',function(event) {
$('#barcodeSubmittedModal').modal();
event.preventDefault(); }
);
if (barcode && barcode.value) {
$('#barcode').on('keypress',function(event) {
$('#barcodeSubmittedModal').modal();
event.preventDefault(); }
);
}
});
[% IF !( CircAutoPrintQuickSlip == 'clear' ) %]
// listen submit to trigger qslip on empty checkout
$('#mainform').bind('submit',function() {