Bugzilla – Attachment 14325 Details for
Bug 8557
in orderreceive.tt and serials-edit.tt the use of a barcode scan send the form unexpectedly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8557 - Unexpected behavior with scanners
Bug-8557---Unexpected-behavior-with-scanners.patch (text/plain), 4.26 KB, created by
Marc Véron
on 2012-12-29 08:55:12 UTC
(
hide
)
Description:
Bug 8557 - Unexpected behavior with scanners
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2012-12-29 08:55:12 UTC
Size:
4.26 KB
patch
obsolete
>From d6065165c50b5caa9e43c4c09baef0519abc81a5 Mon Sep 17 00:00:00 2001 >From: Liz Rea <liz@catalyst.net.nz> >Date: Wed, 12 Dec 2012 15:09:27 +1300 >Subject: [PATCH] Bug 8557 - Unexpected behavior with scanners >Content-Type: text/plain; charset="utf-8" > >This is an alternative to the original implementation - this one works in chrome as well as firefox. > >To test: > >1) >Set syspref 'AcqCreateItem' to 'Create Item when receiving an order.' > >2) >Create a basket for a vendor, add an order line. > >3) >Search for this vendor using Vendor search > >4) >Receive Shipment for this vendor and choose the title you ordered in 2) > >5) You will get the dialog to create related item(s) > >6) >Fill in Item 0 through o (see screenshot) > >7) >Scan Barcode for field p - Barcode > >7) >Result: Scanner sends a [return], form closes and you had no chance to fill in fields t - z > >Signed-off-by: Marc Veron <veron@veron.ch> > >Testted with Chrome Version 23.0.1271.97 m and Firefox 17.0.1, both behave as expected. >--- > .../prog/en/modules/acqui/orderreceive.tt | 20 +++++++++++++++++++- > .../prog/en/modules/serials/serials-edit.tt | 19 ++++++++++++++++++- > 2 files changed, 37 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index da9aefe..a2b29f0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -4,6 +4,25 @@ > [% INCLUDE 'additem.js.inc' %] > <script type="text/javascript" src="[% themelang %]/js/additem.js"> </script> > <script type="text/javascript"> >+ >+var nav = window.Event ? true : false; >+if (nav) { >+ window.captureEvents(Event.KEYDOWN); >+ window.onkeydown = NetscapeEventHandler_KeyDown; >+} else { >+ document.onkeydown = IEEventHandler_KeyDown; >+} >+ >+function NetscapeEventHandler_KeyDown(e) { >+ if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; } >+ return true; >+} >+ >+function IEEventHandler_KeyDown() { >+ if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit') >+ return false; >+ return true; >+} > //<![CDATA[ > function Check(form) { > [% IF (AcqCreateItemReceiving) %] >@@ -322,7 +341,6 @@ > > </div> > </div><div class="yui-g"><fieldset class="action"> >- <input type="submit" onclick="return false;" style="display: none;" id="phony_submit" value="phony_submit" name="phony_submit" /> > <input type="submit" value="Save" class="button" accesskey="w" /> > <a class="cancel" href="/cgi-bin/koha/acqui/parcel.pl?invoiceid=[% invoiceid %]">Cancel</a> > </fieldset></div> </form> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >index 935d9e1..3a64b11 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt >@@ -3,6 +3,24 @@ > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script> > <script language="JavaScript" type="text/javascript"> >+var nav = window.Event ? true : false; >+if (nav) { >+ window.captureEvents(Event.KEYDOWN); >+ window.onkeydown = NetscapeEventHandler_KeyDown; >+} else { >+ document.onkeydown = IEEventHandler_KeyDown; >+} >+ >+function NetscapeEventHandler_KeyDown(e) { >+ if (e.which == 13 && e.target.type != 'textarea' && e.target.type != 'submit') { return false; } >+ return true; >+} >+ >+function IEEventHandler_KeyDown() { >+ if (event.keyCode == 13 && event.srcElement.type != 'textarea' && event.srcElement.type != 'submit') >+ return false; >+ return true; >+} > //<![CDATA[ > function generateReceive() { > var subscriptionid = document.getElementsByName("subscriptionid")[0].value; >@@ -377,7 +395,6 @@ $(document).ready(function() { > > </table> > <fieldset class="action"> >- <input type="submit" onclick="return false;" style="display: none;" id="phony_submit" value="phony_submit" name="phony_submit" /> > <input type="submit" value="Save" class="button" accesskey="w" /> > [% UNLESS ( serialsadditems ) %] <input type="button" onclick="javascript:generateReceive()" value="Multi receiving">[% END %] > </fieldset> >-- >1.7.2.5
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 8557
:
12392
|
12393
|
12689
|
12702
|
13167
|
13247
|
13660
|
13749
|
13750
|
14019
|
14325
|
14556