hello,
I would like to change the background color of the lines in work orders list tab. When I try this I have 2 problems.
- The first one is when is to find the right event when the page is loading.
At this moment, I use this that is available when I click on refresh button :
Ext.define('EAM.custom.external_' + EAM.AppData.getTenantId() + '_wsjobs', {
extend: 'EAM.custom.AbstractExtensibleFramework',
getSelectors: function() {
return {
'[extensibleFramework] [tabName=LST]': { //Evenement déclenché lorsque l'utilisateur sort du champ matériel
afterloaddata : function() {
try
{
setTimeout(function()
{
$('tr:contains("Incident")').css('background-color', 'red');
}, 800);
}
catch(e)
{
console.log(e);
}
}
}...
- The second one is to make available the color change in every records that are appeared in the grid. because when i scroll down some of the record to the end are not impacted with the color change.
At this moment, I use this code that is available for the records I see after refreshing list but not for the records at the bottom I see after using the scroll down
// Select the node that will be observed for mutations
var targetNode = $('.x-toolbar-text.x-box-item.x-toolbar-item.x-toolbar-text-default')[0];
// Options for the observer (which mutations to observe)
var config = { attributes: true, childList: true };
// Callback function to execute when mutations are observed
var callback = function(mutationsList) {
setTimeout(function()
{
$('tr:contains("Incident")').css('background-color', 'red');
}, 800);
};
// Create an observer instance linked to the callback function
var observer = new MutationObserver(callback);
// Start observing the target node for configured mutations
observer.observe(targetNode, config);