@@ -, +, @@ cataloging editor --- .../en/includes/cateditor-widgets-marc21.inc | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) --- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-widgets-marc21.inc @@ -214,6 +214,26 @@ require( [ 'koha-backend', 'widget', 'text-marc' ], function( KohaBackend, Widge return $result[0]; }, + materialTypeMapping: { + a: 'BKS', + c: 'MU', + d: 'MU', + e: 'MPS', + f: 'MPS', + g: 'VM', + i: 'MU', + j: 'MU', + k: 'VM', + m: 'CF', + o: 'VM', + p: 'MX', + r: 'VM', + s: 'CR', + t: 'BKS', + }, + getMaterial: function () { + return this.materialTypeMapping[this.text.substring(0, 1)]; + }, postCreate: function( node, mark ) { this.createFromXML( 'marc21/xml/006' ); } --