Confirm device name with enter key
Use form and submit elements for their built in mouse and keyboard event handlers. // FREEBIE
This commit is contained in:
parent
c9939c8da8
commit
aa55b6a538
2 changed files with 7 additions and 4 deletions
|
@ -63,8 +63,9 @@
|
|||
this.$('#step4 .cancel').click(function(e) {
|
||||
reject();
|
||||
});
|
||||
this.$('#sync').click(function(e) {
|
||||
this.$('#step4').submit(function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var name = this.$('#device-name').val();
|
||||
name = name.replace(/\0/g,''); // strip unicode null
|
||||
if (name.trim().length === 0) {
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id='step4' class='step'>
|
||||
<form id='step4' class='step'>
|
||||
<p>{{ installLinkingWithNumber }}</p>
|
||||
<h2 class='number'></h2>
|
||||
<img id='signal-computer' src='/images/signal-laptop.png'>
|
||||
|
@ -51,9 +51,11 @@
|
|||
<input type='text' id='device-name' spellcheck='false' maxlength='50' />
|
||||
</div>
|
||||
<div class='nav'>
|
||||
<div> <a class='button' id='sync'>{{ installFinalButton }}</a> </div>
|
||||
<div>
|
||||
<input type='submit' class='button' id='sync' value='{{ installFinalButton }}' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div id='step5' class='step'>
|
||||
<img id='signal-icon' src='/images/icon_250.png'/>
|
||||
|
|
Loading…
Reference in a new issue