From 148f3d7099b832d6165dc2f92ca356f1403c0b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Tue, 28 Feb 2023 14:19:11 +0100 Subject: [PATCH] [#173] Make error messages more noticeable. Make "error" font red and increase message time on screen. --- web/include/App.js | 12 ++---------- web/include/phpreport.css | 5 +++++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/web/include/App.js b/web/include/App.js index 7f61409b4..48a8f70de 100644 --- a/web/include/App.js +++ b/web/include/App.js @@ -145,17 +145,9 @@ Ext.extend(Ext.App, Ext.util.Observable, { * @param {Bool} status */ addMessage : function(status, msg) { - var delay = 3; // <-- default delay of msg box is 1 second. + var delay = 3; // <-- default delay if (status == false) { - delay = 5; // <-- when status is error, msg box delay is 3 seconds. - } - // add some smarts to msg's duration (div by 13.3 between 3 & 9 seconds) - delay = msg.length / 13.3; - if (delay < 3) { - delay = 3; - } - else if (delay > 9) { - delay = 9; + delay = 9; // <-- when status is error, msg box delay is increased } this.msgCt.alignTo(document, 't-t'); diff --git a/web/include/phpreport.css b/web/include/phpreport.css index 860b25ae5..cb9633254 100644 --- a/web/include/phpreport.css +++ b/web/include/phpreport.css @@ -130,6 +130,11 @@ div#tasks textarea { margin-bottom: 10px; } +/* ExtJS message box */ +.icon-status-error { + color: #cc0f35; +} + .message.error { background-color: #feecf0; border: 1px solid #cc0f35;