Close quick add on escape key.
authorJan Schneider <jan@horde.org>
Mon, 31 Aug 2009 15:25:57 +0000 (17:25 +0200)
committerJan Schneider <jan@horde.org>
Mon, 31 Aug 2009 21:00:46 +0000 (23:00 +0200)
kronolith/js/kronolith.js
kronolith/templates/index/index.inc

index c4ca3ee..8a57996 100644 (file)
@@ -1704,7 +1704,16 @@ KronolithCore = {
                     break;
                 }
                 break;
+
+            case Event.KEY_ESC:
+                switch (form.identify()) {
+                case 'kronolithQuickinsertForm':
+                    $('kronolithQuickinsert').fade();
+                    break;
+                }
+                break;
             }
+
             return;
         }
 
index 00fafda..74d23be 100644 (file)
@@ -128,7 +128,7 @@ require dirname(__FILE__) . '/agenda.inc';
 <!-- end main area -->
 
 <div id="kronolithQuickinsert" style="display:none">
-  <form action="#" method="post">
+  <form id="kronolithQuickinsertForm" action="">
     <input type="text" id="kronolithQuickinsertQ" value="" />
     <input type="submit" id="kronolithQuickinsertSave" value="<?php echo _("Add") ?>" class="button ok" />
     <input type="submit" id="kronolithQuickinsertCancel" value="x" class="button cancel" /><br />