Message style for notice

This commit is contained in:
unknown 2020-02-28 17:29:07 +01:00
parent 9265433bba
commit 139ea6c8de
2 changed files with 16 additions and 5 deletions

View File

@ -34,8 +34,8 @@ var Locale = {
"Microsoft Access 2003 no está instalado en el sistema" "Microsoft Access 2003 no está instalado en el sistema"
,"MDB file not found": ,"MDB file not found":
"No se encontro el fichero MDB" "No se encontro el fichero MDB"
,"Cache deleted": ,"Cache files have been deleted":
"Caché borrada" "Se han borrado todos los ficheros cacheados"
} }
}; };
@ -181,7 +181,7 @@ var App = {
} }
} }
this.showMessage(_('Cache deleted')); this.showMessage(_('Cache files have been deleted'), 'notice');
}, },
onKeyPress: function(event) { onKeyPress: function(event) {
@ -393,15 +393,16 @@ var App = {
this.regWrite(Conf.dsPath, 'PWD', '', 'REG_SZ'); this.regWrite(Conf.dsPath, 'PWD', '', 'REG_SZ');
this.disableUi(false); this.disableUi(false);
this.showMessage(err.message); this.showMessage(err.message, 'error');
this.resetForm(clearPassword); this.resetForm(clearPassword);
}, },
showMessage: function(message) { showMessage: function(message, className) {
if (this.messageTimeout) if (this.messageTimeout)
clearTimeout(this.messageTimeout); clearTimeout(this.messageTimeout);
var messageDiv = this.$('message'); var messageDiv = this.$('message');
messageDiv.className = className;
messageDiv.innerHTML = message; messageDiv.innerHTML = message;
messageDiv.style.display = 'block'; messageDiv.style.display = 'block';
this.messageTimeout = setTimeout(function() { App.hideMessage(); }, 10000); this.messageTimeout = setTimeout(function() { App.hideMessage(); }, 10000);

View File

@ -94,6 +94,16 @@ button:hover {
font-size: .9em; font-size: .9em;
display: none; display: none;
} }
#message.error {
border-color: #644;
background-color: #EBB;
color: #644;
}
#message.notice {
border-color: #446;
background-color: #bbe;
color: #446;
}
/* Spinner */ /* Spinner */