From 3166b050404a93c7fc60e055f041d54147563bfc Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 5 Oct 2017 15:26:46 +0000 Subject: [PATCH] Bug 19417 - Display full error text when problem importing records To test: 1 - Upload a file to stage 2 - Select your import options 3 - Delete the file form the server, example: sudo rm /tmp/koha_kohadev_uploads/ 4 - 'Click stage for import' 5 - Get an alert 'Failed to submit form: error' 6 - Apply patches 7 - Repeat 1-4 8 - Get a pretty error with all osrt of info --- koha-tmpl/intranet-tmpl/lib/jquery/plugins/humanmsg.js | 1 - koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt | 2 ++ koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/humanmsg.js b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/humanmsg.js index 347d345..a4c1ab9 100644 --- a/koha-tmpl/intranet-tmpl/lib/jquery/plugins/humanmsg.js +++ b/koha-tmpl/intranet-tmpl/lib/jquery/plugins/humanmsg.js @@ -75,7 +75,6 @@ var humanMsg = { bindEvents: function() { // Remove message if mouse is moved or key is pressed jQuery(document) - .mousemove(humanMsg.removeMsg) .click(humanMsg.removeMsg) .keypress(humanMsg.removeMsg) }, 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 3229ea6..233b527 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 @@ -2,6 +2,8 @@ Koha › Tools › Stage MARC records for import [% INCLUDE 'doc-head-close.inc' %] + + diff --git a/koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js b/koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js index cc08618..0bdd887 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js +++ b/koha-tmpl/intranet-tmpl/prog/js/background-job-progressbar.js @@ -69,7 +69,7 @@ function submitBackgroundJob(f) { backgroundJobProgressTimer = setInterval("updateJobProgress()", 500); }, error: function(xml, textStatus) { - alert('Failed to submit form: ' + textStatus); + humanMsg.displayMsg( '

Failed to submit form: '+textStatus+'


'+xml.responseText, { className: 'humanError' } ); } }); -- 2.1.4