@@ -, +, @@ * Remove unneeded year on use Modern::Perl * Fix occasional freeze when reloading existing record * Fix encoding for returned record on first save to catalog --- 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(-) --- a/cataloguing/editor.pl +++ a/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; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc +++ a/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(); } ); } --- a/svc/new_bib +++ a/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)}; --