Merge branch 'master' of https://git.verdnatura.es/vn-access
This commit is contained in:
commit
a6e2657618
15
src/main.js
15
src/main.js
|
@ -165,16 +165,29 @@ var App =
|
|||
|
||||
_onKeyPress: function (e)
|
||||
{
|
||||
var target = event.target || event.srcElement;
|
||||
|
||||
switch (e.keyCode)
|
||||
{
|
||||
case 13: // Enter
|
||||
this._onEnterClick ();
|
||||
this._onEnterPress (target);
|
||||
break;
|
||||
case 27: // Esc
|
||||
window.close ();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
_onEnterPress: function(target)
|
||||
{
|
||||
if ( target && target.id == 'user' && this.$('password').value == '')
|
||||
{
|
||||
this.$('password').focus ();
|
||||
return;
|
||||
}
|
||||
|
||||
this._onEnterClick ();
|
||||
},
|
||||
|
||||
_onEnterClick: function ()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue