From a55d85e50425ebb1518a808ad215f42c6f00772c Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Fri, 31 Aug 2007 11:04:54 +0000 Subject: [PATCH] [MRM-392] - Added javascript function for submitting the form to a specific action depending on which textfield the onKeyPress event was invoked - Added onkeypress action to the property, blacklist pattern and whitelist pattern textfields git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@571430 13f79535-47bb-0310-9956-ffa450edef68 --- .../WEB-INF/jsp/admin/editProxyConnector.jsp | 51 +++++++++++++++++-- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxyConnector.jsp b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxyConnector.jsp index 214736257..cf422116d 100644 --- a/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxyConnector.jsp +++ b/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editProxyConnector.jsp @@ -86,9 +86,11 @@ - : - - + : + + @@ -137,7 +139,8 @@ - + @@ -180,7 +183,8 @@ - + @@ -233,6 +237,43 @@ f.elements[id].value = value; f.submit(); } + + function submitForm( action ) + { + var f = document.forms['saveProxyConnector']; + + f.action = action; + f.submit(); + } + + function submitenter( e, action ) + { + var keycode; + + if (window.event) + { + keycode = window.event.keyCode; + } + else if (e) + { + keycode = e.which; + } + else + { + return true; + } + + if (keycode == 13) + { + submitForm( action ); + return false; + } + else + { + return true; + } + } + //-->