From 739d42c991f14b6a095f7862ac7e35d7197605f1 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sun, 24 Apr 2016 21:11:52 -0400 Subject: [PATCH] Bug 16337 - Remove the use of "onclick" from the stage MARC records template Content-Type: text/plain; charset="utf-8" This patch reviseds the stage MARC records template, removing "onclick" attributes from the markup and defining those events in the script. To test, apply the patch and go to Tools -> Stage MARC records for import. - Select a MARC file for import. - Click the "Upload file" button. Your upload should be processed correctly. - Select a MARC file for import. - Click the "Upload file" button. - Click the "Cancel" button before the file has been uploaded. The upload should be cancelled. --- .../intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt index e2b6425..223b4f9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt @@ -23,6 +23,14 @@ $(document).ready(function(){ $('#items').show(); } }); + $("#fileuploadbutton").on("click",function(e){ + e.preventDefault(); + StartUpload(); + }); + $("#fileuploadcancel").on("click",function(e){ + e.preventDefault(); + CancelUpload(); + }); }); function CheckForm(f) { if ($("#fileToUpload").value == '') { @@ -137,8 +145,8 @@ function cbUpload( status, fileid ) {
- - + +
-- 2.1.4