From fa6348b6d7a83cce155bd6f227fb5150b2f39c63 Mon Sep 17 00:00:00 2001 From: Jesse Weaver Date: Tue, 10 Nov 2015 12:02:06 -0700 Subject: [PATCH] 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 Signed-off-by: Josef Moravec --- koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js index 3b8622a..d2cc7b5 100644 --- a/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js +++ b/koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js @@ -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' ); -- 2.1.4