Hi Steve,
Apologies for the delay! You can add the below property in the color_fonts.css file present in \\MaximoAnywhere\apps\WorkExecution\platform\ui\control\css\mdpi
customBackgroundColor {
background-color: #FFE663;
}
Invoke this property in the WO detail handler something like below
backgroundColor: function(eventContext){
var currentWO = eventContext.getResource('workOrder').getCurrentRecord();
var worktype = currentWO.get('worktype');
if (worktype == 'EM'){
eventContext.textWidget.domNode.className+=' customBackgroundColor';
}
},
------------------------------
Vijayalakshmi Laxman
------------------------------
Original Message:
Sent: Mon January 25, 2021 09:25 AM
From: Steve Lee
Subject: How to change the text color or background color of a View
Hi, Can either yourself or Mani please forward an example of how this was achieved at a field level or in my case we want to set the background color of the worklist row if the worktype = 'EM' so all workorders in the list that are of Emergency Maintenance stand out from the other work orders in the list?
Any help will be appreciated
Regards
Steve Lee
------------------------------
Steve Lee
Maximo Technical Sales Specialist
IBM
Leeds
Original Message:
Sent: Tue June 16, 2020 01:03 AM
From: Vijayalakshmi Laxman
Subject: How to change the text color or background color of a View
Hi Mani,
I'm fine, How are you doing ?
Thanks a lot for the below response. I was able to get this done however in case of 7.6.4 modifying main.css in common\css does not work. We have to modify color_fonts.css present in \\app\appname\common\js\platform\ui\control\css only then it works.
------------------------------
Vijayalakshmi Laxman
Original Message:
Sent: Mon June 15, 2020 06:27 AM
From: Manikanda Prabhu
Subject: How to change the text color or background color of a View
Hi Vijayalakshmi
How are you?
I assume the folder structure remains the same in the version 7.6.4. I have done something similar in 7.6.3, reducing the font size for a text label. I had to add a new css definition and I think it should work for your case. The file name is main.css under the folder common/css. You may have to add a new definition with the background color you wish to have. Let me know how it goes.
------------------------------
Manikanda Prabhu
Maximo Solutions Engineer
Deloitte Ireland Maximo CoE
Original Message:
Sent: Fri June 05, 2020 01:35 PM
From: Vijayalakshmi Laxman
Subject: How to change the text color or background color of a View
Hi,
Is there a way to change the text color or background color of a sub-view? For example in Work Execution app on Work order details view we have sub view like Work Log and I would like to change the color of the text Work Log or background color to RED to indicate that the record exists. I understand this would require to write a java script however I'm unable to figure out the exact syntax for the same. I tried the below and it works for a field but not for views. While using on views it gives and error as "Cannot read property 'domNode' of undefined" . I'm trying to do this in Maximo Anywhere 7.6.4.
eventContext. textWidget.domNode.className+= 'red-text'
Thanks,
------------------------------
Vijayalakshmi Laxman
------------------------------
#MaximoAnywhere
#AssetandFacilitiesManagement
#Maximo