Skip to content

Commit b1eb1e7

Browse files
committed
[#173] Make error messages more noticeable.
Make "error" font red and increase message time on screen.
1 parent be96c54 commit b1eb1e7

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-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

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

133+
/* ExtJS message box */
134+
.icon-status-error {
135+
color: #cc0f35;
136+
137+
}
138+
133139
.message.error {
134140
background-color: #feecf0;
135141
border: 1px solid #cc0f35;

0 commit comments

Comments
 (0)