j-Enter
This component evaluates some method if the user press enter. Important: component finds all input elements and performs CAN() for the path.
Configuration:
exec {String}a method name for executionvalidate {Boolean}enables validate (default:true)trigger {String}can contain a selector for triggering a realclickevent (default:button[name="submit"])timeout {Number}a timeout as a prevention for multi-press ofenterkey (default:1500)- NEW
delay {Number}a delay for submitting data (default:500ms)
Use it with <ui-component name="enter">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.
<ui-component name="enter" config="exec:doSubmit;validate:false" style="padding:50px;max-width:300px">
<div>Login</div>
<div><input type="text" /></div>
<br />
<div>Password</div>
<div><input type="password" /></div>
</ui-component>
<script>
function doSubmit() {
alert('ENTER pressed');
}
</script>