mirror of
https://github.com/Doodle3D/doodle3d-connect.git
synced 2024-12-25 01:53:48 +01:00
autofocus password field
This commit is contained in:
parent
2c9354dce9
commit
7b929a1506
@ -39,6 +39,9 @@
|
|||||||
_form.attr("id","Join "+_pageData.ssid);
|
_form.attr("id","Join "+_pageData.ssid);
|
||||||
_passwordField.val("");
|
_passwordField.val("");
|
||||||
_passwordCloneField.val("");
|
_passwordCloneField.val("");
|
||||||
|
});
|
||||||
|
$.mobile.document.on( "pageshow", PAGE_ID, function( event, data ) {
|
||||||
|
d3d.util.autofocus(_form);
|
||||||
});
|
});
|
||||||
$.mobile.document.on( "pagehide", PAGE_ID, function( event, data ) {
|
$.mobile.document.on( "pagehide", PAGE_ID, function( event, data ) {
|
||||||
console.log(PAGE_ID+" pagehide");
|
console.log(PAGE_ID+" pagehide");
|
||||||
|
@ -95,6 +95,12 @@ d3d.util = {
|
|||||||
console.log("WARNING:"+warning);
|
console.log("WARNING:"+warning);
|
||||||
return warning;
|
return warning;
|
||||||
};
|
};
|
||||||
|
},
|
||||||
|
autofocus:function(form) {
|
||||||
|
if (!("autofocus" in document.createElement("input"))) {
|
||||||
|
var target = form.find("input[autofocus]:visible");
|
||||||
|
target.focus();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@
|
|||||||
<div role="main" class="ui-content">
|
<div role="main" class="ui-content">
|
||||||
<h3>Join a secured network</h3>
|
<h3>Join a secured network</h3>
|
||||||
<form data-ajax="false" data-target="#connecting_to_network">
|
<form data-ajax="false" data-target="#connecting_to_network">
|
||||||
<input type="password" name="password" placeholder="Password" data-clear-btn="true" data-typetoggle='#showPassword' autocomplete="off">
|
<input type="password" name="password" placeholder="Password" data-clear-btn="true" data-typetoggle='#showPassword' autocomplete="off" autofocus>
|
||||||
<input id="showPassword" type="checkbox" value="showPassword">
|
<input id="showPassword" type="checkbox" value="showPassword">
|
||||||
<label for="showPassword" class="inline">show password</label>
|
<label for="showPassword" class="inline">show password</label>
|
||||||
<input type=submit value="Connect">
|
<input type=submit value="Connect">
|
||||||
|
Loading…
Reference in New Issue
Block a user