File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Client-Side Components/Client Scripts/Highlight Priority Field Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ function onLoad ( ) {
2+ var priority = g_form . getValue ( 'priority' ) ;
3+ var control = g_form . getControl ( 'priority' ) ;
4+
5+ if ( control ) {
6+ switch ( priority ) {
7+ case '1' : // Critical
8+ control . style . backgroundColor = '#ff4d4d' ;
9+ control . style . color = 'white' ;
10+ control . style . fontWeight = 'bold' ;
11+ break ;
12+ case '2' : // High
13+ control . style . backgroundColor = '#ffa500' ;
14+ control . style . color = 'black' ;
15+ control . style . fontWeight = 'bold' ;
16+ break ;
17+ case '3' : // Moderate
18+ control . style . backgroundColor = '#ffff66' ;
19+ control . style . color = 'black' ;
20+ control . style . fontWeight = 'bold' ;
21+ break ;
22+ case '4' : // Low
23+ control . style . backgroundColor = '#d3ffd3' ;
24+ control . style . color = 'black' ;
25+ control . style . fontWeight = 'bold' ;
26+ break ;
27+ case '5' : // Planning
28+ control . style . backgroundColor = '#e0e0e0' ;
29+ control . style . color = 'black' ;
30+ control . style . fontWeight = 'bold' ;
31+ break ;
32+ default :
33+ control . style . backgroundColor = '' ;
34+ control . style . fontWeight = 'normal' ;
35+ }
36+ }
37+ }
You can’t perform that action at this time.
0 commit comments