From a06674a43cafeb0d6409ef8d6cab13eb1c477f50 Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Mon, 26 Oct 2015 15:11:07 -0600 Subject: [PATCH] [PASSED QA] Bug 11559: (QA followup) fix several small issues This fixes the following: * Remove unneeded year on use Modern::Perl * Fix occasional freeze when reloading existing record * Fix encoding for returned record on first save to catalog Signed-off-by: Katrin Fischer --- cataloguing/editor.pl | 2 +- koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc | 6 +++--- svc/new_bib | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cataloguing/editor.pl b/cataloguing/editor.pl index 8bf9a78..fe31c0b 100755 --- a/cataloguing/editor.pl +++ b/cataloguing/editor.pl @@ -18,7 +18,7 @@ # along with Koha; if not, see . # -use Modern::Perl '2009'; +use Modern::Perl; use CGI; use MARC::Record; diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc index 4e4d9b2..443c022 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc @@ -753,7 +753,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr // Automatically detect resizes and change the height of the editor and position of modals. var resizeTimer = null; - $( window ).resize( function() { + function onResize() { if ( resizeTimer == null ) resizeTimer = setTimeout( function() { resizeTimer = null; @@ -770,8 +770,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr return -($(this).width() / 2); } } ); - - } ).resize(); + } $( '#macro-ui' ).on( 'shown', function() { if ( macroEditor ) return; @@ -1087,6 +1086,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Resources.GetAll().done( function() { $("#loading").hide(); + $( window ).resize( onResize ).resize(); editor.focus(); } ); } diff --git a/svc/new_bib b/svc/new_bib index e1b6933..ba6742a 100755 --- a/svc/new_bib +++ b/svc/new_bib @@ -51,7 +51,7 @@ sub add_bib { my $result = {}; my $inxml = $query->param('POSTDATA'); - print $query->header(-type => 'text/xml'); + print $query->header(-type => 'text/xml', -charset => 'utf-8'); my $marcflavour = C4::Context->preference('marcflavour') || 'MARC21'; my $record = eval {MARC::Record::new_from_xml( $inxml, "utf8", $marcflavour)}; -- 1.9.1