callback( record );
},
},
+ 'duplicate': {
+ titleForRecord: _("Editing duplicate record of #{ID}"),
+ get: function( id, callback ) {
+ if ( !id ) return false;
+
+ KohaBackend.GetRecord( id, callback );
+ },
+ save: function( id, record, done ) {
+ function finishCb( data ) {
+ done( { error: data.error, newRecord: data.marcxml && data.marcxml[0], newId: data.biblionumber && [ 'catalog', data.biblionumber ] } );
+ }
+
+ KohaBackend.CreateRecord( record, finishCb );
+ }
+ },
'catalog': {
titleForRecord: _("Editing catalog record #{ID}"),
links: [
}
},
'iso2709': {
- saveLabel: _("Save as ISO2709 (.mrc) file"),
+ saveLabel: _("Save as MARC (.mrc) file"),
save: function( id, record, done ) {
saveAs( new Blob( [record.toISO2709()], { 'type': 'application/octet-stream;charset=utf-8' } ), 'record.mrc' );
if ( resizeTimer == null ) resizeTimer = setTimeout( function() {
resizeTimer = null;
- var pos = $('#editor .CodeMirror').position();
+ var pos = $('#editor .CodeMirror').offset();
$('#editor .CodeMirror').height( $(window).height() - pos.top - 24 - $('#changelanguage').height() ); // 24 is hardcoded value but works well
$('.modal-body').each( function() {