[OPEN-ILS-DEV] ***SPAM*** Patch to fix "insert subfield" shortcut key conflict in Mac client
Dan Scott
denials at gmail.com
Mon Apr 13 23:22:58 EDT 2009
2009/3/26 Alexander O'Neill <aoneill at upei.ca>:
> Hi Everyone,
>
> We encountered a problem with the Evergreen staff client when running on Mac
> OS X. When editing a MARC record, the default shortcut key to add a new
> subfield (Ctrl-d) didn't do anything. We discovered that it was conflicting
> with the default Mac OS system behaviour - delete the character to the right
> of the insertion point.
>
> Anyway here is a very simple patch that makes "Ctrl-i" also be a shortcut to
> add a subfield. This doesn't conflict with anything else since you can't
> use italics in MARC subfields. ;)
>
> The patch was against version rel_1_2_2_2, and needs to be applied in the
> directory /openils/var/web/xul/[STAFF CLIENT BUILD NUMBER]/server/cat
> because of the staff client build numbers insanity.
>
> The patch also updates the text box when you hit the Help button on the MARC
> edit screen.
>
> If you don't want to apply a patch here are the changes:
>
> marcedit.js - line 230:
> Change:
> if (event.charCode == 100 && event.ctrlKey) { //
> ctrl+d
> To:
> // Use Ctrl-I for Mac since Ctrl-D conflicts (UPEI)
> if ((event.charCode == 100 || event.charCode == 105)
> && event.ctrlKey) { // ctrl+d
>
> marcedit.xul - line 13
> Change:
> <button label="Help" accesskey="H" oncommand="alert('Add Row:
> CTRL+Enter\nInsert Row: CTRL+Shift+Enter\nAdd Subfield: CTRL+D\nRemove Row:
> CTRL+Del\nRemove Subfield: SHIFT+Del\nCreate/Replace 006:
> CTRL+F6\nCreate/Replace 007: CTRL+F7\nCreate/Replace 008: CTRL+F8\n');"/>
> To:
> <button label="Help" accesskey="H" oncommand="alert('Add Row:
> CTRL+Enter\nInsert Row: CTRL+Shift+Enter\nAdd Subfield: CTRL+D (CTRL+I on
> Mac)\nRemove Row: CTRL+Del\nRemove Subfield: SHIFT+Del\nCreate/Replace 006:
> CTRL+F6\nCreate/Replace 007: CTRL+F7\nCreate/Replace 008: CTRL+F8\n');"/>
>
> We aren't running 1.4 yet but looking at the source code I think this bit is
> unchanged from 1.2.
In 1.4 and beyond, the strings are in a separate file for
internationalization purposes - but otherwise, things were indeed
unchanged. Which made it easy for me to apply the patch to trunk in
r12862 - thanks a ton, Alex.
> Hopefully this is useful for people looking to use the Mac client. If there
> is interest in fixing the other shortcut key problems in the Mac client let
> me know and I'll devote some more time to it.
I don't know what other shortcut key conflicts exist on the Mac, but
I'm sure that your offer is appreciated and will be taken advantage of
as more Mac users adopt Evergreen :)
Thanks again!
--
Dan Scott
Laurentian University
More information about the Open-ils-dev
mailing list