Is it possible to color the sections/tab?

SanjivMeher
Kilo Patron
Kilo Patron

I want to have different colors for each tab in my CMDB module. Is it possible to do so?


Please mark this response as correct or helpful if it assisted you with your question.
1 ACCEPTED SOLUTION

saisowmya
Giga Expert

Hi Sanjiv,



Hope you are asking something as below.


find_real_file.png





You can achieve this by writing a on load client script on your table:



Script:


function onLoad() {


    //Type appropriate comment here, and begin script below


var tabs = document.getElementsByClassName('tabs2_tab');


tabs[0].style.backgroundColor = 'red';


tabs[1].style.backgroundColor = 'green';


tabs[2].style.backgroundColor = 'orange';


tabs[3].style.backgroundColor = 'blue';


tabs[4].style.backgroundColor = 'yellow';



}



section numbers starts from 0. Replace the tab number with your required number to add color to that particular tab/section.



If you want to add colors to related lists as below , the next number will be followed in the script.


find_real_file.png




Please mark the answer as correct, if your issue is resolved


View solution in original post

11 REPLIES 11

amlanpal
Kilo Sage

Hi Sanjiv,



If you are looking for making the section/tab mandatory on clicking any UI Action, then you might refer this thread: When incident is Resolved, user should jump to closure information section tab



I hope this helps. Please mark correct/helpful based on impact


saisowmya
Giga Expert

Hi Sanjiv,



Hope you are asking something as below.


find_real_file.png





You can achieve this by writing a on load client script on your table:



Script:


function onLoad() {


    //Type appropriate comment here, and begin script below


var tabs = document.getElementsByClassName('tabs2_tab');


tabs[0].style.backgroundColor = 'red';


tabs[1].style.backgroundColor = 'green';


tabs[2].style.backgroundColor = 'orange';


tabs[3].style.backgroundColor = 'blue';


tabs[4].style.backgroundColor = 'yellow';



}



section numbers starts from 0. Replace the tab number with your required number to add color to that particular tab/section.



If you want to add colors to related lists as below , the next number will be followed in the script.


find_real_file.png




Please mark the answer as correct, if your issue is resolved


Cool. That works



Please mark this response as correct or helpful if it assisted you with your question.