[OPEN-ILS-DEV] ***SPAM*** Patch to fix "insert subfield" shortcut key conflict in Mac client

Alexander O'Neill aoneill at upei.ca
Thu Mar 26 10:51:23 EDT 2009


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: marcedit_mac_insert_subfield_key.patch
Type: application/octet-stream
Size: 1489 bytes
Desc: not available
Url : http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20090326/cb0df632/attachment.obj 
-------------- next part --------------



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.

Cheers,

---
Alexander O'Neill
Programmer / Analyst
Robertson Library
University of Prince Edward Island





More information about the Open-ils-dev mailing list