bug 2896 : added javascript to capture enter pressed into the template
This commit is contained in:
parent
2d71a40f32
commit
b1e6c98600
|
@ -14,9 +14,9 @@
|
||||||
|
|
||||||
Transform ADL into velocity view templates
|
Transform ADL into velocity view templates
|
||||||
|
|
||||||
$Author: sb $
|
$Author: dmcnicol $
|
||||||
$Revision: 1.51 $
|
$Revision: 1.52 $
|
||||||
$Date: 2009-05-04 13:53:18 $
|
$Date: 2009-05-05 08:25:53 $
|
||||||
-->
|
-->
|
||||||
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
<!-- WARNING WARNING WARNING: Do NOT reformat this file!
|
||||||
Whitespace (or lack of it) is significant! -->
|
Whitespace (or lack of it) is significant! -->
|
||||||
|
@ -381,7 +381,7 @@
|
||||||
#end
|
#end
|
||||||
#end
|
#end
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<form method="post" onsubmit="invokeSubmitHandlers( this)" class="tabbed">
|
<form method="post" onsubmit="invokeSubmitHandlers( this);return trapEnterSubmissions(event, this);" class="tabbed">
|
||||||
<xsl:attribute name="action">
|
<xsl:attribute name="action">
|
||||||
<xsl:value-of select="concat( $form/@name, 'SubmitHandler.rails')"/>
|
<xsl:value-of select="concat( $form/@name, 'SubmitHandler.rails')"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
|
@ -1469,6 +1469,23 @@
|
||||||
var validator = new Validation('<xsl:value-of select="$form/@name"/>', {immediate : true, useTitles : true});
|
var validator = new Validation('<xsl:value-of select="$form/@name"/>', {immediate : true, useTitles : true});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var enterPressed = false;
|
||||||
|
|
||||||
|
function trapKeyPress(event, form){
|
||||||
|
if(event.which == 13){
|
||||||
|
enterPressed = true;
|
||||||
|
} else {
|
||||||
|
enterPressed = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function trapEnterSubmissions(event, form){
|
||||||
|
if(enterPressed){
|
||||||
|
enterPressed = false; //we have trapped this, can stand down
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
<xsl:for-each select="//adl:typedef">
|
<xsl:for-each select="//adl:typedef">
|
||||||
<xsl:variable name="errormsg">
|
<xsl:variable name="errormsg">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
@ -1770,7 +1787,7 @@
|
||||||
Auto generated Velocity macro for <xsl:value-of select="@name"/>,
|
Auto generated Velocity macro for <xsl:value-of select="@name"/>,
|
||||||
generated from ADL.
|
generated from ADL.
|
||||||
|
|
||||||
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.51 $', 10)"/>
|
Generated using adl2views.xslt <xsl:value-of select="substring( '$Revision: 1.52 $', 10)"/>
|
||||||
Generation parameters were:
|
Generation parameters were:
|
||||||
area-name: <xsl:value-of select="$area-name"/>
|
area-name: <xsl:value-of select="$area-name"/>
|
||||||
default-url: <xsl:value-of select="$default-url"/>
|
default-url: <xsl:value-of select="$default-url"/>
|
||||||
|
|
Loading…
Reference in a new issue