Bug 11559: (QA followup) fix several small issues
authorJesse Weaver <pianohacker@gmail.com>
Mon, 26 Oct 2015 21:11:07 +0000 (15:11 -0600)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 27 Oct 2015 15:25:01 +0000 (12:25 -0300)
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 <katrin.fischer.83@web.de>
cataloguing/editor.pl
koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc
svc/new_bib

index 8bf9a78..fe31c0b 100755 (executable)
@@ -18,7 +18,7 @@
 # along with Koha; if not, see <http://www.gnu.org/licenses>.
 #
 
-use Modern::Perl '2009';
+use Modern::Perl;
 
 use CGI;
 use MARC::Record;
index 4e4d9b2..443c022 100644 (file)
@@ -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();
             } );
         }
index e1b6933..ba6742a 100755 (executable)
@@ -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)};