diff options
Diffstat (limited to 'apps/contacts/js/contacts.js')
-rw-r--r-- | apps/contacts/js/contacts.js | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 1aa4c2a32d9..dcfd8e71d96 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -1711,6 +1711,10 @@ $(document).ready(function(){ $('#contacts_newcontact').click(Contacts.UI.Card.editNew); $('#contacts_newcontact').keydown(Contacts.UI.Card.editNew); + $('#ninjahelp .close').on('click keydown',function() { + $('#ninjahelp').hide(); + }); + $(document).on('keyup', function(event) { console.log(event.which + ' ' + event.target.nodeName); if(event.target.nodeName.toUpperCase() != 'BODY' @@ -1721,8 +1725,13 @@ $(document).ready(function(){ /** * To add: * (Shift)n/p: next/prev addressbook + * u (85): hide/show leftcontent + * f (70): add field */ switch(event.which) { + case 27: // Esc + $('#ninjahelp').hide(); + break; case 46: if(event.shiftKey) { Contacts.UI.Card.delayedDelete(); @@ -1737,19 +1746,21 @@ $(document).ready(function(){ case 75: // k Contacts.UI.Contacts.next(); break; - case 38: // up case 65: // a if(event.shiftKey) { // add addressbook + Contacts.UI.notImplemented(); break; } Contacts.UI.Card.editNew(); break; + case 38: // up case 74: // j Contacts.UI.Contacts.previous(); break; case 78: // n // next addressbook + Contacts.UI.notImplemented(); break; case 13: // Enter case 79: // o @@ -1760,16 +1771,13 @@ $(document).ready(function(){ break; case 80: // p // prev addressbook + Contacts.UI.notImplemented(); break; case 82: // r Contacts.UI.Contacts.update({cid:Contacts.UI.Card.id}); break; case 191: // ? - console.log("Keyboard shorcuts:\nk or up key: Previous contact"); - console.log("j or down key: Next contact"); - console.log("o or Enter key: Expand/collapse"); - console.log("n: New contact"); - console.log("Shift-Delete: Delete current contact"); + $('#ninjahelp').toggle('fast'); break; } |