SmartInput for back quoted text

This commit is contained in:
2016-02-22 03:08:07 +08:00
parent 82451a41b9
commit 82ef981d0a
14 changed files with 297 additions and 50 deletions

View File

@@ -26,11 +26,12 @@
var init = function ()
{
var username;
var form = Dand.wrapne('form'
, [
// Basic login and password fields
, Dand.wrapc("flsf", "Name:")
, Dand.wrapna('input', [ field_username, new IKey("type", "text") ] )
, username = Dand.wrapna('input', [ field_username, new IKey("type", "text") ] )
, Dand.wrapc("flsf", "Password:")
, Dand.wrapna('input', [ field_password, new IKey("type", "password") ] )
@@ -42,13 +43,13 @@
new IKey('action', formAction)
, new IKey('method', 'POST')
]
)
;
);
var mbox = new MessageBox( "Blog.Astro", form, "Login", false, submitForm.bind( form ) ).show();
// Handle enter button
username.focus();
// Handle enter button
mbox.onkeyup = function( _e )
{
if ( submitForm.bind( form )( _e.which == 13 ) )