From f6738ea4dc043d0eb87f61a71e344d4341c04e7a Mon Sep 17 00:00:00 2001 From: Mehdi ABAAKOUK Date: Fri, 16 Dec 2011 12:59:00 +0100 Subject: [PATCH] Handler Enter key --- templates/layout.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/layout.html b/templates/layout.html index 5b882b9..ba0fb9e 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -39,6 +39,14 @@ $("#host option[value='{{host}}']").attr("selected", "selected") $("#host").change() + keypress_handler = function(e) { + if (e.which == 13) { + $("#submit").click() + } + }; + $("#prefix").keypress(keypress_handler) + $("#name").keypress(keypress_handler) + });