Bug 17179: Add keyboard shortcuts to repeat (duplicate) a field, and cut text
commit3b0ab38559ba021430aa1d9775748a6cb8dc94b2
authorNick Clemens <nick@bywatersolutions.com>
Wed, 20 Feb 2019 17:30:36 +0000 (20 17:30 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 9 Oct 2019 13:36:09 +0000 (9 14:36 +0100)
treef8f132e2e1189245fd195cc03e3b51facc0a3449
parent90e2882568375bce956d0cb50edfa070c42cafce
Bug 17179: Add keyboard shortcuts to repeat (duplicate) a field, and cut text

This patchset introduces an internal clipboard to the advanced editor
and provides some new functionality to make use of this, default shortcuts are provided
but can be edited per bug 21411

The default shortcuts for new/changed functions are:

Changed:
Ctrl-X:       Now cuts a line into the clipboard area
Shift-Ctrl-X: Now cuts current subfield into clipboard area

Added:
Ctrl-C:       Copies a line into the clipboard area
Shift-Ctrl-C: Copies current subfield into clipboard area
Ctrl-P:       Pastes the selected item from the clipboard at cursor
Ctrl-I:       Copies the current line and inserts onto a new line below

To test:
Verify all functionality above and confirm it behaves as expected

Note:
Ctrl-v pastes from the system clipboard - codemirror does not have
access and this is why we use our "Clipboard"

For browser cut/paste please use mouse right click or context menus

Ctrl-P can be accessed as print by focusing outside the editor window

Signed-off-by: Alex Sassmannshausen <alex@komputilo.eu>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
installer/data/mysql/atomicupdate/bug_17179_add_keyboard_shortcuts.perl [new file with mode: 0644]
koha-tmpl/intranet-tmpl/lib/koha/cateditor/marc-editor.js
koha-tmpl/intranet-tmpl/prog/en/includes/keyboard_shortcuts.inc
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/editor.tt