Commit | Line | Data |
---|---|---|
e99c53fb BA |
1 | function state2col(state) |
2 | { | |
3 | switch (state) | |
4 | { | |
5 | case "process": | |
6 | return "black"; | |
7 | case "error": | |
8 | return "red"; | |
9 | case "info": | |
10 | return "blue"; | |
11 | default: //idle | |
12 | return "white"; //irrelevant, dialog is hidden | |
13 | } | |
14 | } | |
15 | ||
16 | function show($dialog) | |
17 | { | |
18 | $dialog.removeClass("hide"); | |
19 | } | |
20 | ||
21 | function hide($dialog) | |
22 | { | |
23 | $dialog.addClass("hide"); | |
24 | } | |
25 | ||
26 | function showMsg($dialog, state, msg) | |
27 | { | |
28 | $dialog.html(msg); | |
29 | $dialog.css("color", state2col(state)); | |
30 | } |