Skip to content

Commit ddbeb19

Browse files
committedMar 8, 2023
[#173] Make error messages more noticeable.
Make "error" font red, add an icon next to it and increase message time on screen.
1 parent 13e9c2b commit ddbeb19

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed
 

‎web/include/App.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,9 @@ Ext.extend(Ext.App, Ext.util.Observable, {
145145
* @param {Bool} status
146146
*/
147147
addMessage : function(status, msg) {
148-
var delay = 3; // <-- default delay of msg box is 1 second.
148+
var delay = 3; // <-- default delay
149149
if (status == false) {
150-
delay = 5; // <-- when status is error, msg box delay is 3 seconds.
151-
}
152-
// add some smarts to msg's duration (div by 13.3 between 3 & 9 seconds)
153-
delay = msg.length / 13.3;
154-
if (delay < 3) {
155-
delay = 3;
156-
}
157-
else if (delay > 9) {
158-
delay = 9;
150+
delay = 9; // <-- when status is error, msg box delay is increased
159151
}
160152

161153
this.msgCt.alignTo(document, 't-t');

‎web/include/phpreport.css

+15
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,21 @@ div#tasks textarea {
130130
margin-bottom: 10px;
131131
}
132132

133+
/* ExtJS message box */
134+
.icon-status-error {
135+
color: #cc0f35;
136+
padding-left: 20px;
137+
}
138+
139+
.icon-status-error:before {
140+
content: "";
141+
position: absolute;
142+
height: 16px;
143+
width: 16px;
144+
left: 14px;
145+
background-image: url(icons/cross.png);
146+
}
147+
133148
.message.error {
134149
background-color: #feecf0;
135150
border: 1px solid #cc0f35;

0 commit comments

Comments
 (0)
Please sign in to comment.