Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Calendar & Events > Adding color to the calendar sign-up status
Mottie (SuperAdmin) 7/13/2009 10:38 AM EST : Adding color to the calendar sign-up status
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Adding Signup Status Color

GuildPortal admin site link to the original post

This jQuery script will add CSS classes to the character status, so you can set the color yourself with the CSS and the script will do the rest. Within the script, you can set it to just color the Status column or the entire row. This is what it will look like:



The Code


This is now a Mod
Control Panel > Site Mods > Get Site Mods >
Look for "Signup Status Color"


Or, add the code to a free form text/HTML box on your calendar page while in <> HTML mode (ideally). It should also work if you decide to add the code to the Banner or Footer HTML.
<style type="text/css">
.Alternate, .Alternate a:link { color: #ff8000; }
.Available, .Available a:link { color: #00dd00; }
.Cancelled, .Cancelled a:link { color: #dd0000; text-decoration: line-through; }
.Confirmed, .Confirmed a:link { color: #0080dd; }
.Tentative, .Tentative a:link { color: #888888; }
.WaitList, .WaitList a:link { color: #dd00dd; }
</style>
<script type="text/javascript">
$(document).ready(function(){
  var styleEntireRow = true

 // ***************************
 // Don't Change anything below
 // ***************************

 , tmp, c;
  $("div[id$='signupsHolder']").find("table[class^=signupsTable]")
  .find('.AltGridRow,.NormGridRow').each(function(){
  tmp = $(this).find('td:nth-child(2)');
  c = (tmp.text()).replace(/\s+/,'');
  if (styleEntireRow) {
   $(this).addClass(c);
  } else {
    tmp.addClass(c);
  }
 });
});
</script>
Customizing
  • Change the CSS to your desired coloring/style for the event status (in blue)
  • Set the script variable "styleEntireRow" to true if you want the entire row to have the CSS applied to it. if set to false, only the Status will have the style.

Edit (2/5/2011): Updated and cleaned up to work with Calendar changes.
Edit (2/11/2011): Updated to work with new changes.
Edit (5/28/2011): Updated to work again.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Mottie (SuperAdmin) 2/11/2011 8:02 PM EST : RE: Adding color to the calendar sign-up status
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Updated!
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Mottie (SuperAdmin) 3/8/2012 12:32 PM EST : RE: Adding color to the calendar sign-up status
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi Lakshmii!

I just took a look at your site (this event) and everything but the mini calendar seems fine to me... I looked at the mini calendar on my site and it hadn't changed, so maybe there is some css on your site that is interfering? I can't tell. 

But if you add this css to your custom css, it should un-squish the calendar:

table.eventComments { width: 100%; }
table.eventComments th { width: 14.2%; }


Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Indomptable (Applicant) 9/18/2012 11:21 AM EST : RE: Adding color to the calendar sign-up status
Indomptable
Posts: 388

0
Like

0
Dislike

Hi Mottie,

The mod is broken again after one of the last update of Guildportal.
The colors aren't displayed on each lines.
TopBottom

Mottie (SuperAdmin) 9/19/2012 11:00 AM EST : RE: Adding color to the calendar sign-up status
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Ok, I just fixed it... awaiting GP approval now.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Indomptable (Applicant) 10/1/2012 11:07 AM EST : RE: Adding color to the calendar sign-up status
Indomptable
Posts: 388

0
Like

0
Dislike

Really thanks for the update, it's working again fine today.
TopBottom

 
 
Key 
New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%