Bug 11559: (followup) Fill in default values, fix redirect and UNIMARC
This fixes the following issues: * Help for UNIMARC tags broken * MARC21 resources loaded when in UNIMARC * Clicking on "advanced editor" in basic editor fails * Shift-Tab goes to the beginning of a fixed-field widget rather than the end Signed-off-by: Nick Clemens <nick@quecheelibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
This commit is contained in:
parent
9c30a2ebe2
commit
042b4da576
5 changed files with 12 additions and 7 deletions
|
@ -156,7 +156,7 @@ define( [ '/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=defin
|
||||||
record.addFieldGrouped( newField );
|
record.addFieldGrouped( newField );
|
||||||
|
|
||||||
if ( tagnum < '010' ) {
|
if ( tagnum < '010' ) {
|
||||||
newField.addSubfield( [ '@', '' ] );
|
newField.addSubfield( [ '@', (taginfo.subfields[0] ? taginfo.subfields[0][1].defaultvalue : null ) || '' ] );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ define( [ '/cgi-bin/koha/svc/cataloguing/framework?frameworkcode=&callback=defin
|
||||||
if ( subfieldinfo.mandatory != "1" && !allTags ) return;
|
if ( subfieldinfo.mandatory != "1" && !allTags ) return;
|
||||||
|
|
||||||
$.each( fields, function( undef, field ) {
|
$.each( fields, function( undef, field ) {
|
||||||
if ( !field.hasSubfield(subfieldcode) ) field.addSubfieldGrouped( [ subfieldcode, '' ] );
|
if ( !field.hasSubfield(subfieldcode) ) field.addSubfieldGrouped( [ subfieldcode, subfieldinfo.defaultvalue || '' ] );
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -172,7 +172,7 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ],
|
||||||
|
|
||||||
for ( var i = positions.length - 1; i >= 0; i-- ) {
|
for ( var i = positions.length - 1; i >= 0; i-- ) {
|
||||||
if ( positions[i].ch < cur.ch ) {
|
if ( positions[i].ch < cur.ch ) {
|
||||||
activateTabPosition( cm, positions[i] );
|
activateTabPosition( cm, positions[i], -1 );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,12 @@ define( [ 'module' ], function( module ) {
|
||||||
_allResources.push(deferred);
|
_allResources.push(deferred);
|
||||||
}
|
}
|
||||||
|
|
||||||
_res( 'marc21/xml/006', $.get( module.config().themelang + '/data/marc21_field_006.xml' ) );
|
switch ( module.config().marcflavour ) {
|
||||||
_res( 'marc21/xml/008', $.get( module.config().themelang + '/data/marc21_field_008.xml' ) );
|
case 'MARC21':
|
||||||
|
_res( 'marc21/xml/006', $.get( module.config().themelang + '/data/marc21_field_006.xml' ) );
|
||||||
|
_res( 'marc21/xml/008', $.get( module.config().themelang + '/data/marc21_field_008.xml' ) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return Resources;
|
return Resources;
|
||||||
} );
|
} );
|
||||||
|
|
|
@ -7,6 +7,7 @@ require.config( {
|
||||||
baseUrl: '/intranet-tmpl/lib/koha/cateditor/',
|
baseUrl: '/intranet-tmpl/lib/koha/cateditor/',
|
||||||
config: {
|
config: {
|
||||||
resources: {
|
resources: {
|
||||||
|
marcflavour: '[% marcflavour %]',
|
||||||
themelang: '[% themelang %]',
|
themelang: '[% themelang %]',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -179,7 +180,7 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr
|
||||||
var first = tag[0];
|
var first = tag[0];
|
||||||
var url = "http://archive.ifla.org/VI/3/p1996-1/uni" + first + ".htm#";
|
var url = "http://archive.ifla.org/VI/3/p1996-1/uni" + first + ".htm#";
|
||||||
if ( first == '0' ) url += "b";
|
if ( first == '0' ) url += "b";
|
||||||
if ( first != '9' ) url += field;
|
if ( first != '9' ) url += tag;
|
||||||
|
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@
|
||||||
var biblionumber = [% biblionumber || "null" %];
|
var biblionumber = [% biblionumber || "null" %];
|
||||||
|
|
||||||
if ( biblionumber ) {
|
if ( biblionumber ) {
|
||||||
window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog:' + biblionumber;
|
window.location = '/cgi-bin/koha/cataloguing/editor.pl#catalog/' + biblionumber;
|
||||||
} else {
|
} else {
|
||||||
window.location = '/cgi-bin/koha/cataloguing/editor.pl';
|
window.location = '/cgi-bin/koha/cataloguing/editor.pl';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue