Jump to content

Change Color Of Field In Calendar View


Go to solution Solved by ShWolf,

Recommended Posts

I have set up a calendar report with multiple records on each date. Some of the entries have pending status, others are scheduled. I would like the pending records to have the status field's font color as red.

 

This would make it much faster to find lessons that need to be scheduled. I cannot schedule the same lesson at the same time for different teachers, so there is a lot of juggling involved.  The calendar view is critical so we can easily see the other lessons for the same day and week.

 

The field name is LessonStatus, the value of field is either archived, cancelled, scheduled or pending

 

Any help would be appreciated!

 

Thanks

 

 

post-12222-0-99776800-1408700712_thumb.p

Link to post
Share on other sites
  • Solution

Hello Artdocent,

 

Insert this code into the Footer of the Calendar result page:

<script>
window.onload = function(){
try
{
var v_nodes = document.querySelectorAll('span[class*="cbResultSetData"]');
for(var v_i= 0 ; v_i < v_nodes .length; v_i++){
if(v_nodes.item(v_i).innerHTML.search('pending')!= -1){
v_nodes.item(v_i).style.color = '#f00';
}
}
}
catch(v_ex){}
};
</script>

Let me know if this helps.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...