View | Details | Raw Unified | Return to bug 23045
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js (-2 / +1 lines)
Lines 48-57 define( [ 'marc-record' ], function( MARC ) { Link Here
48
        TextToRecord: function( text ) {
48
        TextToRecord: function( text ) {
49
            var record = new MARC.Record();
49
            var record = new MARC.Record();
50
            var errors = [];
50
            var errors = [];
51
52
            $.each( text.split('\n'), function( i, line ) {
51
            $.each( text.split('\n'), function( i, line ) {
52
                if (line === "") {return};
53
                var tagNumber = line.match( /^([A-Za-z0-9]{3}) / );
53
                var tagNumber = line.match( /^([A-Za-z0-9]{3}) / );
54
55
                if ( !tagNumber ) {
54
                if ( !tagNumber ) {
56
                    errors.push( { type: 'noTag', line: i } );
55
                    errors.push( { type: 'noTag', line: i } );
57
                    return;
56
                    return;
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc (-1 / +1 lines)
Lines 282-287 require( [ 'koha-backend', 'widget', 'text-marc' ], function( KohaBackend, Widge Link Here
282
        },
282
        },
283
        getMaterial: function () {
283
        getMaterial: function () {
284
            const record = TextMarc.TextToRecord(this.editor.cm.getValue());
284
            const record = TextMarc.TextToRecord(this.editor.cm.getValue());
285
285
            const leader = record.leader();
286
            const leader = record.leader();
286
            const leader6 = leader.substring(6, 7);
287
            const leader6 = leader.substring(6, 7);
287
            let materialType = this.materialTypeMapping[leader6];
288
            let materialType = this.materialTypeMapping[leader6];
288
- 

Return to bug 23045