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)
committerBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Thu, 6 Jun 2013 01:02:57 +0000 (22:02 -0300)
commit62a88b82c47fd361677a32db669567bca22984ef
treebc5eb220d400523fb80ba96cd8d9f29b2217f418
parent363eb07090a90a01f75fdcccd7168dc21a2a19c2
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.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 9e4c289d3f68aaab5d47172940e30fba0819804e)

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Refactoring, but needed for 10310 inclusion
(cherry picked from commit c8ea6ba025455a26a585733fdb214942a9823a45)

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
(cherry picked from commit c8ea6ba025455a26a585733fdb214942a9823a45)
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