Bug 9507: prevent submit: refactor some code in a js file
authorJonathan Druart <jonathan.druart@biblibre.com>
Wed, 30 Jan 2013 14:19:58 +0000 (15:19 +0100)
committerChris Hall <followingthepath@gmail.com>
Wed, 12 Jun 2013 07:33:39 +0000 (19:33 +1200)
commit7bac076cdc94051700ece215baec31a60fddc799
tree3255355c0a3b87dce44e72681efbcbabc75976c9
parent5a146577813f8f7d8598f762bf880a54a6568c81
Bug 9507: prevent submit: refactor some code in a js file

This patch refactors some code in a js file.

Test plan:
On acqui/neworderempty.pl, acqui/orderreceive.pl and
serials/serials-edit.tt try to scan a barcode (or press enter) on the
form and check that it is not sent.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Have to note that the code for IE9 does not work. Before and after this patch.
If we refactor code, it would have been nice to resolve this too.
But I do not oppose pushing this patch.
The test uses 'an ancient Netscape property' window.Event (uppercase!) to make
the distinction between browers and event models. Some more documentation here
would be welcome too.
koha-tmpl/intranet-tmpl/prog/en/js/prevent_submit.js [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/serials-edit.tt