Errores solucionados, ahora solo funciona con access 2003

This commit is contained in:
Juan Ferrer Toribio 2017-09-25 13:34:25 +02:00
parent 1eed448800
commit e38a7e9820
1 changed files with 28 additions and 19 deletions

View File

@ -14,19 +14,21 @@ var Conf =
var Locale ={
es: {
"Enter a user name":
"Introduce un nombre de usuario"
,"Enter a password":
"Introduce una contraseña"
,"Server can't be reached":
"No se ha podido conectar con el servidor"
,"Updating":
"Actualizando"
,"Bad login":
"Usuario o contraseña incorrectos"
,"Loading":
"Cargando"
,"Error while updating":
"Error al actualizar"
"Introduce un nombre de usuario"
,"Enter a password":
"Introduce una contraseña"
,"Server can't be reached":
"No se ha podido conectar con el servidor"
,"Updating":
"Actualizando"
,"Bad login":
"Usuario o contraseña incorrectos"
,"Loading":
"Cargando"
,"Error while updating":
"Error al actualizar"
,"Microsoft Access 2003 is not installed":
"Microsoft Access 2003 no está instalado en el sistema"
}
};
@ -185,12 +187,10 @@ var App =
_onKeyPress: function (e)
{
var target = event.target || event.srcElement;
switch (e.keyCode)
{
case 13: // Enter
this._onEnterPress (target);
this._onEnterPress (e);
break;
case 27: // Esc
window.close ();
@ -198,9 +198,11 @@ var App =
}
},
_onEnterPress: function (target)
_onEnterPress: function (event)
{
if ( target && target.id == 'user' && this.$('password').value == '')
var target = event.target || event.srcElement;
if (target && target.id == 'user' && this.$('password').value == '')
{
this.$('password').focus ();
return;
@ -354,7 +356,14 @@ var App =
{
var remember = this.$('remember').checked ? 1 : 0;
this.regWrite (Conf.regPath, 'remember', remember, 'REG_DWORD');
this.shell.run (this.mdbFile, 0, false);
var programFiles = this.getEnv ('ProgramFiles');
var accessBin = programFiles +'\\Microsoft Office\\OFFICE11\\MSACCESS.EXE';
if (!this.fso.fileExists (accessBin))
throw new Error (_('Microsoft Access 2003 is not installed'));
this.shell.exec ('"'+ accessBin +'" "'+ this.mdbFile +'"');
window.close ();
},