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

(-)a/C4/Installer/PerlDependencies.pm (+5 lines)
Lines 762-767 our $PERL_DEPS = { Link Here
762
        'required' => '0',
762
        'required' => '0',
763
        'min_ver'  => '0.614',
763
        'min_ver'  => '0.614',
764
    },
764
    },
765
    'UUID' => {
766
        'usage'    => 'Professional cataloging interface',
767
        'required' => '1',
768
        'min_ver'  => '0.05',
769
    },
765
};
770
};
766
771
767
1;
772
1;
(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/koha-backend.js (-3 / +1 lines)
Lines 56-63 define( [ '/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=defin Link Here
56
56
57
            _framework_mappings[frameworkcode][tagnum] = $.extend( {}, taginfo, { subfields: subfields } );
57
            _framework_mappings[frameworkcode][tagnum] = $.extend( {}, taginfo, { subfields: subfields } );
58
        } );
58
        } );
59
60
        console.dir( _framework_kohafields );
61
    }
59
    }
62
60
63
    _importFramework( '', defaultFramework.framework );
61
    _importFramework( '', defaultFramework.framework );
Lines 138-144 define( [ '/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=defin Link Here
138
            $.each( _frameworks[frameworkcode], function( undef, tag ) {
136
            $.each( _frameworks[frameworkcode], function( undef, tag ) {
139
                var tagnum = tag[0], taginfo = tag[1];
137
                var tagnum = tag[0], taginfo = tag[1];
140
138
141
                if ( taginfo[field] == value ) result[tagnum] = true;
139
                if ( taginfo[field] == value && taginfo.tab != '-1' ) result[tagnum] = true;
142
            } );
140
            } );
143
141
144
            return result;
142
            return result;
(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js (-9 / +13 lines)
Lines 47-53 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
47
47
48
        if ( change.from.ch == change.to.ch - 1 && cm.findMarksAt( { line: change.from.line, ch: change.from.ch + 1 } ).length ) {
48
        if ( change.from.ch == change.to.ch - 1 && cm.findMarksAt( { line: change.from.line, ch: change.from.ch + 1 } ).length ) {
49
            change.cancel();
49
            change.cancel();
50
        } else if ( change.from.ch == change.to.ch && cm.findMarksAt(change.from).length && !change.text[0].match(/^[$|ǂ‡]$/) ) {
50
        } else if ( change.from.ch == change.to.ch && cm.findMarksAt(change.from).length && !change.text[0] == '‡' ) {
51
            change.cancel();
51
            change.cancel();
52
        }
52
        }
53
    }
53
    }
Lines 68-74 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
68
68
69
            for (var line = origin; line <= newTo.line; line++) {
69
            for (var line = origin; line <= newTo.line; line++) {
70
                if ( Preferences.user.fieldWidgets ) Widget.UpdateLine( cm.marceditor, line );
70
                if ( Preferences.user.fieldWidgets ) Widget.UpdateLine( cm.marceditor, line );
71
                if ( change.origin != 'setValue' && change.origin != 'marcWidgetPrefill' && change.origin != 'widget.clearToText' ) cm.addLineClass( line, 'wrapper', 'modified-line' );
71
                if ( change.origin != 'setValue' && change.origin != 'marcWidgetPrefill' && change.origin != 'widget.clearToText' ) {
72
                    cm.addLineClass( line, 'wrapper', 'modified-line' );
73
                    editor.modified = true;
74
                }
72
            }
75
            }
73
        }
76
        }
74
77
Lines 206-212 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
206
            // make it be the double cross.
209
            // make it be the double cross.
207
            var cur = cm.getCursor();
210
            var cur = cm.getCursor();
208
211
209
            cm.replaceRange( "$", cur, null );
212
            cm.replaceRange( "‡", cur, null );
210
        },
213
        },
211
    };
214
    };
212
215
Lines 244-250 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
244
            this.contentsStart = start;
247
            this.contentsStart = start;
245
            this.code = '@';
248
            this.code = '@';
246
        } else {
249
        } else {
247
            this.contentsStart = start + 3;
250
            this.contentsStart = start + 2;
248
            this.code =  this.field.contents.substr( this.start + 1, 1 );
251
            this.code =  this.field.contents.substr( this.start + 1, 1 );
249
        }
252
        }
250
253
Lines 350-356 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
350
            var result = '';
353
            var result = '';
351
354
352
            $.each( this.getSubfields(), function() {
355
            $.each( this.getSubfields(), function() {
353
                if ( this.code != '@' ) result += '$' + this.code + ' ';
356
                if ( this.code != '@' ) result += '‡' + this.code;
354
357
355
                result += this.getText();
358
                result += this.getText();
356
            } );
359
            } );
Lines 358-364 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
358
            return result;
361
            return result;
359
        },
362
        },
360
        setText: function( text ) {
363
        setText: function( text ) {
361
            var indicator_match = /^([_ 0-9])([_ 0-9])\$/.exec( text );
364
            var indicator_match = /^([_ 0-9])([_ 0-9])\‡/.exec( text );
362
            if ( indicator_match ) {
365
            if ( indicator_match ) {
363
                text = text.substr(2);
366
                text = text.substr(2);
364
                this.setIndicator1( indicator_match[1] );
367
                this.setIndicator1( indicator_match[1] );
Lines 398-404 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
398
            if ( this.isControlField ) throw new FieldError('Cannot add subfields to control field');
401
            if ( this.isControlField ) throw new FieldError('Cannot add subfields to control field');
399
402
400
            this._invalidateSubfields();
403
            this._invalidateSubfields();
401
            this.cm.replaceRange( '$' + code + ' ', { line: this.line }, null, 'marcAware' );
404
            this.cm.replaceRange( '‡' + code, { line: this.line }, null, 'marcAware' );
402
            var subfields = this.getSubfields();
405
            var subfields = this.getSubfields();
403
406
404
            return subfields[ subfields.length - 1 ];
407
            return subfields[ subfields.length - 1 ];
Lines 410-416 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
410
413
411
            var subfields = this.getSubfields();
414
            var subfields = this.getSubfields();
412
            this._invalidateSubfields();
415
            this._invalidateSubfields();
413
            this.cm.replaceRange( '$' + code + ' ', { line: this.line, ch: subfields[position] ? subfields[position].start : null }, null, 'marcAware' );
416
            this.cm.replaceRange( '‡' + code, { line: this.line, ch: subfields[position] ? subfields[position].start : null }, null, 'marcAware' );
414
            subfields = this.getSubfields();
417
            subfields = this.getSubfields();
415
418
416
            return subfields[ position ];
419
            return subfields[ position ];
Lines 501-506 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
501
504
502
        displayRecord: function( record ) {
505
        displayRecord: function( record ) {
503
            this.cm.setValue( TextMARC.RecordToText(record) );
506
            this.cm.setValue( TextMARC.RecordToText(record) );
507
            this.modified = false;
504
        },
508
        },
505
509
506
        getRecord: function() {
510
        getRecord: function() {
Lines 530-536 define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ], Link Here
530
534
531
            if ( tagNumber < '010' ) return { tagNumber: tagNumber, contents: contents }; // No current subfield
535
            if ( tagNumber < '010' ) return { tagNumber: tagNumber, contents: contents }; // No current subfield
532
536
533
            var matcher = /[$|ǂ‡]([a-z0-9%]) /g;
537
            var matcher = /‡([a-z0-9%])/g;
534
            var match;
538
            var match;
535
539
536
            var subfields = [];
540
            var subfields = [];
(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-mode.js (-4 / +4 lines)
Lines 17-23 Link Here
17
 * along with Koha; if not, see <http://www.gnu.org/licenses>.
17
 * along with Koha; if not, see <http://www.gnu.org/licenses>.
18
 */
18
 */
19
19
20
// Expected format: 245 _ 1 $a Pizza |c 34ars
20
// Expected format: 245 _ 1 ‡aPizza ‡c34ars
21
21
22
CodeMirror.defineMode( 'marc', function( config, modeConfig ) {
22
CodeMirror.defineMode( 'marc', function( config, modeConfig ) {
23
    modeConfig.nonRepeatableTags = modeConfig.nonRepeatableTags || {};
23
    modeConfig.nonRepeatableTags = modeConfig.nonRepeatableTags || {};
Lines 130-143 CodeMirror.defineMode( 'marc', function( config, modeConfig ) { Link Here
130
                    // matching.
130
                    // matching.
131
                    if ( stream.match( /[ \t]+$/ ) ) {
131
                    if ( stream.match( /[ \t]+$/ ) ) {
132
                        return 'end-space';
132
                        return 'end-space';
133
                    } else if ( stream.match( /[^ \t$|ǂ‡]+/ ) || stream.match( /[ \t]+/ ) ) {
133
                    } else if ( stream.match( /[^ \t‡]+/ ) || stream.match( /[ \t]+/ ) ) {
134
                        return;
134
                        return;
135
                    }
135
                    }
136
                }
136
                }
137
137
138
                if ( stream.eat( /[$|ǂ‡]/ ) ) {
138
                if ( stream.eat( '‡' ) ) {
139
                    var subfieldCode;
139
                    var subfieldCode;
140
                    if ( ( subfieldCode = stream.eat( /[a-zA-Z0-9%]/ ) ) && stream.eat( ' ' ) ) {
140
                    if ( ( subfieldCode = stream.eat( /[a-zA-Z0-9%]/ ) ) ) {
141
                        state.subfieldCode = subfieldCode;
141
                        state.subfieldCode = subfieldCode;
142
                        if ( state.seenSubfields[state.subfieldCode] && ( modeConfig.nonRepeatableSubfields[state.tagNumber] || {} )[state.subfieldCode] ) {
142
                        if ( state.seenSubfields[state.subfieldCode] && ( modeConfig.nonRepeatableSubfields[state.tagNumber] || {} )[state.subfieldCode] ) {
143
                            return 'bad-subfieldcode';
143
                            return 'bad-subfieldcode';
(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-record.js (-2 / +7 lines)
Lines 236-243 define( function() { Link Here
236
        },
236
        },
237
237
238
        loadISO2709: function(data) {
238
        loadISO2709: function(data) {
239
            // The underlying offsets work on bytes, not characters
239
            // The underlying offsets work on bytes, not characters, so we have to encode back into
240
            data = _encode_utf8(data);
240
            // UTF-8 before we try to use the directory.
241
            //
242
            // The substr is a performance optimization; we can only load the first record, so we
243
            // extract only the first record. We may get some of the next record, because the substr
244
            // happens before UTF-8 encoding, but that won't cause any issues.
245
            data = _encode_utf8(data.substr(0, parseInt(data.substr(0, 5))));
241
246
242
            this._fieldlist.length = 0;
247
            this._fieldlist.length = 0;
243
            this.leader(data.substr(0, 24));
248
            this.leader(data.substr(0, 24));
(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/text-marc.js (-14 / +5 lines)
Lines 18-32 Link Here
18
 */
18
 */
19
19
20
define( [ 'marc-record' ], function( MARC ) {
20
define( [ 'marc-record' ], function( MARC ) {
21
    // Convert any characters for display
22
    function _sanitize( text ) {
23
        return text.replace( '$', '{dollar}' );
24
    }
25
26
    // Undo conversion
27
    function _desanitize( text ) {
28
        return text.replace( '{dollar}', '$' );
29
    }
30
    return {
21
    return {
31
        RecordToText: function( record ) {
22
        RecordToText: function( record ) {
32
            var lines = [];
23
            var lines = [];
Lines 36-42 define( [ 'marc-record' ], function( MARC ) { Link Here
36
                var field = fields[i];
27
                var field = fields[i];
37
28
38
                if ( field.isControlField() ) {
29
                if ( field.isControlField() ) {
39
                    lines.push( field.tagnumber() + ' ' + _sanitize( field.subfield( '@' ) ) );
30
                    lines.push( field.tagnumber() + ' ' + field.subfield('@') );
40
                } else {
31
                } else {
41
                    var result = [ field.tagnumber() + ' ' ];
32
                    var result = [ field.tagnumber() + ' ' ];
42
33
Lines 44-50 define( [ 'marc-record' ], function( MARC ) { Link Here
44
                    result.push( field.indicator(1) == ' ' ? '_' : field.indicator(1), ' ' );
35
                    result.push( field.indicator(1) == ' ' ? '_' : field.indicator(1), ' ' );
45
36
46
                    $.each( field.subfields(), function( i, subfield ) {
37
                    $.each( field.subfields(), function( i, subfield ) {
47
                        result.push( '$' + subfield[0] + ' ' + _sanitize( subfield[1] ) );
38
                        result.push( '‡' + subfield[0] + subfield[1] );
48
                    } );
39
                    } );
49
40
50
                    lines.push( result.join('') );
41
                    lines.push( result.join('') );
Lines 68-74 define( [ 'marc-record' ], function( MARC ) { Link Here
68
                tagNumber = tagNumber[1];
59
                tagNumber = tagNumber[1];
69
60
70
                if ( tagNumber < '010' ) {
61
                if ( tagNumber < '010' ) {
71
                    var field = new MARC.Field( tagNumber, ' ', ' ', [ [ '@', _desanitize( line.substring( 4 ) ) ] ] );
62
                    var field = new MARC.Field( tagNumber, ' ', ' ', [ [ '@', line.substring( 4 ) ] ] );
72
                    field.sourceLine = i;
63
                    field.sourceLine = i;
73
                    record.addField( field );
64
                    record.addField( field );
74
                } else {
65
                } else {
Lines 80-86 define( [ 'marc-record' ], function( MARC ) { Link Here
80
71
81
                    var field = new MARC.Field( tagNumber, ( indicators[1] == '_' ? ' ' : indicators[1] ), ( indicators[2] == '_' ? ' ' : indicators[2] ), [] );
72
                    var field = new MARC.Field( tagNumber, ( indicators[1] == '_' ? ' ' : indicators[1] ), ( indicators[2] == '_' ? ' ' : indicators[2] ), [] );
82
73
83
                    var matcher = /[$|ǂ‡]([a-zA-Z0-9%]) /g;
74
                    var matcher = /‡([a-zA-Z0-9%])/g;
84
                    var match;
75
                    var match;
85
76
86
                    var subfields = [];
77
                    var subfields = [];
Lines 97-103 define( [ 'marc-record' ], function( MARC ) { Link Here
97
                    $.each( subfields, function( i, subfield ) {
88
                    $.each( subfields, function( i, subfield ) {
98
                        var next = subfields[ i + 1 ];
89
                        var next = subfields[ i + 1 ];
99
90
100
                        field.addSubfield( [ subfield.code, _desanitize( line.substring( subfield.ch + 3, next ? next.ch : line.length ) ) ] );
91
                        field.addSubfield( [ subfield.code, line.substring( subfield.ch + 3, next ? next.ch : line.length ) ] );
101
                    } );
92
                    } );
102
93
103
                    field.sourceLine = i;
94
                    field.sourceLine = i;
(-)a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/widget.js (-1 / +1 lines)
Lines 250-256 define( [ 'resources' ], function( Resources ) { Link Here
250
            } else {
250
            } else {
251
                for ( var i = 0; i < info.subfields.length; i++ ) {
251
                for ( var i = 0; i < info.subfields.length; i++ ) {
252
                    var next = ( i < info.subfields.length - 1 ) ? info.subfields[i + 1].ch : end;
252
                    var next = ( i < info.subfields.length - 1 ) ? info.subfields[i + 1].ch : end;
253
                    subfields.push( { code: info.subfields[i].code, from: info.subfields[i].ch + 3, to: next } );
253
                    subfields.push( { code: info.subfields[i].code, from: info.subfields[i].ch + 2, to: next } );
254
                }
254
                }
255
                // If not a fixed field, and we didn't find any subfields, we need to throw in the
255
                // If not a fixed field, and we didn't find any subfields, we need to throw in the
256
                // '@' subfield so we can properly remove it
256
                // '@' subfield so we can properly remove it
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/cateditor.css (-1 / +7 lines)
Lines 55-60 body { Link Here
55
    padding-bottom: 0;
55
    padding-bottom: 0;
56
}
56
}
57
57
58
#shortcuts-container {
59
    font-size: 12px;
60
}
61
58
/*> MARC editor */
62
/*> MARC editor */
59
#editor .CodeMirror {
63
#editor .CodeMirror {
60
    line-height: 1.2;
64
    line-height: 1.2;
Lines 77-85 body { Link Here
77
.cm-subfieldcode {
81
.cm-subfieldcode {
78
    background-color: #F4F4F4;
82
    background-color: #F4F4F4;
79
    color: #187848;
83
    color: #187848;
80
    border-radius: 3px 8px 8px 3px;
84
    border-radius: 3px;
81
    border-right: 2px solid white;
85
    border-right: 2px solid white;
82
    font-weight: bold;
86
    font-weight: bold;
87
    padding-left: 3px;
88
    padding-right: 3px;
83
    margin-right: -2px;
89
    margin-right: -2px;
84
}
90
}
85
91
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc (-6 / +32 lines)
Lines 437-445 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
437
437
438
        $('#searchresults thead tr').append('<th>' + _("Tools") + '</th>');
438
        $('#searchresults thead tr').append('<th>' + _("Tools") + '</th>');
439
439
440
        var bibnumMap = KohaBackend.GetSubfieldForKohaField('biblio.biblionumber');
440
        $.each( data.hits, function( undef, hit ) {
441
        $.each( data.hits, function( undef, hit ) {
441
            backends.search.records[ hit.server + ':' + hit.index ] = hit.record;
442
            backends.search.records[ hit.server + ':' + hit.index ] = hit.record;
442
            hit.id = 'search/' + hit.server + ':' + hit.index;
443
444
            switch ( hit.server ) {
445
                case 'koha:biblioserver':
446
                    var bibnumField = hit.record.field( bibnumMap[0] );
447
448
                    if ( bibnumField && bibnumField.hasSubfield( bibnumMap[1] ) ) {
449
                        hit.id = 'catalog/' + bibnumField.subfield( bibnumMap[1] );
450
                        break;
451
                    }
452
453
                    // Otherwise, fallthrough
454
455
                default:
456
                    hit.id = 'search/' + hit.server + ':' + hit.index;
457
            }
443
458
444
            var result = '<tr>';
459
            var result = '<tr>';
445
            result += '<td class="sourcecol">' + z3950Servers[ hit.server ].name + '</td>';
460
            result += '<td class="sourcecol">' + z3950Servers[ hit.server ].name + '</td>';
Lines 455-461 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
455
            } );
470
            } );
456
471
457
            result += '<td class="toolscol"><ul><li><a href="#" class="marc-link">' + _("View MARC") + '</a></li>';
472
            result += '<td class="toolscol"><ul><li><a href="#" class="marc-link">' + _("View MARC") + '</a></li>';
458
            result += '<li><a href="#" class="open-link">' + _("Import") + '</a></li>';
473
            result += '<li><a href="#" class="open-link">' + ( hit.server == 'koha:biblioserver' ? _("Edit") : _("Import") ) + '</a></li>';
459
            if ( state.canSave ) result += '<li><a href="#" class="substitute-link" title="' + _("Replace the current record's contents") + '">' + _("Substitute") + '</a></li>';
474
            if ( state.canSave ) result += '<li><a href="#" class="substitute-link" title="' + _("Replace the current record's contents") + '">' + _("Substitute") + '</a></li>';
460
            result += '</ul></td></tr>';
475
            result += '</ul></td></tr>';
461
476
Lines 670-676 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
670
            var modified = macro.modified && new Date(macro.modified);
685
            var modified = macro.modified && new Date(macro.modified);
671
            $li.find( '.macro-info' ).append(
686
            $li.find( '.macro-info' ).append(
672
                '<li><span class="label">' + _("Last changed:") + '</span>' +
687
                '<li><span class="label">' + _("Last changed:") + '</span>' +
673
                ( modified ? modified.toLocaleFormat() : _("never") ) + '</li>'
688
                ( modified ? ( modified.toLocaleDateString() + ', ' + modified.toLocaleTimeString() ) : _("never") ) + '</li>'
674
            );
689
            );
675
            $('#macro-list').append($li);
690
            $('#macro-list').append($li);
676
        } );
691
        } );
Lines 721-727 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
721
                    if ( !subfield ) return;
736
                    if ( !subfield ) return;
722
737
723
                    var subfieldinfo = taginfo.subfields[ subfield.code ];
738
                    var subfieldinfo = taginfo.subfields[ subfield.code ];
724
                    $('#status-subfield-info').html( '<strong>$' + subfield.code + ':</strong> ' );
739
                    $('#status-subfield-info').html( '<strong>‡' + subfield.code + ':</strong> ' );
725
740
726
                    if ( subfieldinfo ) {
741
                    if ( subfieldinfo ) {
727
                        $('#status-subfield-info').append( subfieldinfo.lib );
742
                        $('#status-subfield-info').append( subfieldinfo.lib );
Lines 833-846 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
833
                            if ( error.subfield == '@' ) {
848
                            if ( error.subfield == '@' ) {
834
                                editor.addError( error.line, _("Missing control field contents") );
849
                                editor.addError( error.line, _("Missing control field contents") );
835
                            } else {
850
                            } else {
836
                                editor.addError( error.line, _("Missing mandatory subfield: $") + error.subfield );
851
                                editor.addError( error.line, _("Missing mandatory subfield: ‡") + error.subfield );
837
                            }
852
                            }
838
                            break;
853
                            break;
839
                        case 'unrepeatableTag':
854
                        case 'unrepeatableTag':
840
                            editor.addError( error.line, _("Tag ") + error.tag + _(" cannot be repeated") );
855
                            editor.addError( error.line, _("Tag ") + error.tag + _(" cannot be repeated") );
841
                            break;
856
                            break;
842
                        case 'unrepeatableSubfield':
857
                        case 'unrepeatableSubfield':
843
                            editor.addError( error.line, _("Subfield $") + error.subfield + _(" cannot be repeated") );
858
                            editor.addError( error.line, _("Subfield ‡") + error.subfield + _(" cannot be repeated") );
844
                            break;
859
                            break;
845
                        case 'itemTagUnsupported':
860
                        case 'itemTagUnsupported':
846
                            editor.addError( error.line, _("Item tags cannot currently be saved") );
861
                            editor.addError( error.line, _("Item tags cannot currently be saved") );
Lines 1030-1036 require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr Link Here
1030
                return '<div id="alerts-container"><ul>' + prevAlerts.join('') + '</ul></div>';
1045
                return '<div id="alerts-container"><ul>' + prevAlerts.join('') + '</ul></div>';
1031
            },
1046
            },
1032
        });
1047
        });
1048
1049
        $('#show-shortcuts').popover({
1050
            html: true,
1051
            placement: 'bottom',
1052
            content: function() {
1053
                return '<div id="shortcuts-container">' + $('#shortcuts-contents').html() + '</div>';
1054
            },
1055
        });
1056
1033
        $('#new-record' ).click( function() {
1057
        $('#new-record' ).click( function() {
1058
            if ( editor.modified && !confirm( _("Are you sure you want to erase your changes?") ) ) return;
1059
1034
            openRecord( 'new/', editor );
1060
            openRecord( 'new/', editor );
1035
            return false;
1061
            return false;
1036
        } );
1062
        } );
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/labs.pref (-1 / +1 lines)
Lines 8-11 Labs: Link Here
8
                  no: "Don't enable"
8
                  no: "Don't enable"
9
            - the advanced cataloging editor.
9
            - the advanced cataloging editor.
10
            - "<br/> NOTE:"
10
            - "<br/> NOTE:"
11
            - This feature is currently experimental, and may have bugs that cause corruption of records. Please help us test it and report any bugs, but do so at your own risk.
11
            - This feature is currently experimental, and may have bugs that cause corruption of records. It also does not include any support for UNIMARC or NORMARC fixed fields. Please help us test it and report any bugs, but do so at your own risk.
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt (-2 / +51 lines)
Lines 57-63 Link Here
57
                <li><a class="set-font" style="font-family: peep" href="#">peep</a></li>
57
                <li><a class="set-font" style="font-family: peep" href="#">peep</a></li>
58
            </ul>
58
            </ul>
59
        </div>
59
        </div>
60
        <button class="btn btn-small" id="show-alerts" title="Previous alerts"><i class="icon-info-sign"></i> Alerts <span class="caret"></span></button>
60
        <button class="btn btn-small" id="show-alerts" title="Previous alerts"><i class="icon-bell"></i> Alerts <span class="caret"></span></button>
61
        <button class="btn btn-small" id="show-shortcuts" title="Supported keyboard shortcuts"><i class="icon-list-alt"></i> Keyboard shortcuts <span class="caret"></span></button>
61
    </div>
62
    </div>
62
    [%# CodeMirror instance will be inserted here %]
63
    [%# CodeMirror instance will be inserted here %]
63
    <div id="statusbar">
64
    <div id="statusbar">
Lines 228-233 Link Here
228
    </div>
229
    </div>
229
</div>
230
</div>
230
231
232
<div id="shortcuts-contents">
233
<table class="table table-condensed">
234
    <thead>
235
        <tr>
236
            <th>Shortcut</th>
237
            <th>Behavior</th>
238
        </tr>
239
    </thead>
240
    <tbody>
241
        <tr>
242
            <td>Ctrl-D</td>
243
            <td>Insert delimiter (‡)</td>
244
        </tr>
245
        <tr>
246
            <td>Ctrl-H</td>
247
            <td>Get help on current subfield</td>
248
        </tr>
249
        <tr>
250
            <td>Ctrl-S</td>
251
            <td>Save record</td>
252
        </tr>
253
        <tr>
254
            <td>Ctrl-X</td>
255
            <td>Delete current field</td>
256
        </tr>
257
        <tr>
258
            <td>Ctrl-Shift-X</td>
259
            <td>Delete current field</td>
260
        </tr>
261
        <tr>
262
            <td>Enter</td>
263
            <td>New field on next line</td>
264
        </tr>
265
        <tr>
266
            <td>Shift-Enter</td>
267
            <td>Insert line break</td>
268
        </tr>
269
        <tr>
270
            <td>Tab</td>
271
            <td>Move to next position</td>
272
        </tr>
273
        <tr>
274
            <td>Shift-Tab</td>
275
            <td>Move to previous position</td>
276
        </tr>
277
    </tbody>
278
</table>
279
</div>
280
231
</div>
281
</div>
232
282
233
[% PROCESS 'cateditor-ui.inc' %]
283
[% PROCESS 'cateditor-ui.inc' %]
234
- 

Return to bug 11559