Bug 18417: Advanced Editor (Rancor) add shortcuts for copyright symbols (C) (P)

To test:
1 - Apply patch
2 - Open advanced cataloging editor
3 - Try using Alt+P and Alt+C and note symbols are added
4 - Save record and ensure symbols are saved

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Jesse Weaver 2015-11-10 12:02:06 -07:00 committed by Jonathan Druart
parent 09e330aa24
commit 1fd17efba8

View file

@ -136,6 +136,14 @@ define( [ 'marc-record', 'koha-backend', 'preferences', 'text-marc', 'widget' ],
}
var _editorKeys = {
'Alt-C': function( cm ) {
cm.replaceRange( '©', cm.getCursor() );
},
'Alt-P': function( cm ) {
cm.replaceRange( '℗', cm.getCursor() );
},
Enter: function( cm ) {
var cursor = cm.getCursor();
cm.replaceRange( '\n', { line: cursor.line }, null, 'marcAware' );