Posts

Showing posts from April, 2017

SP2013 and PlanetWilson.SharePoint.ColourCalendarV2.4

So, we finally upgraded to SharePoint 2013. PlanetWilson.SharePoint.ColourCalendarV2.4 was being used on our old SP2007 farm.  I delayed writing this script until my company was off of SP2007, thinking someone else would write it by the time we migrated. However, I noticed no one easily Googleable has done it. So after a few hours of coding, here is the script that you can add to your calendars that are using Planet Wilson color coding to get it working again, as originally designed (pulling colors from the Colour Calendar Mapping list). I wrote it using SharePoint 2013 JavaScript Client API.  I didn't use JQuery to reduce the number of library dependencies it had.  Just plain old JavaScript.  It uses document.getElementsByClassName, though, which only started getting support from IE  after IE11.  If you are on SP2013, you are more than likely using a fairly recent browser, anyways. 1) Throw the below code into a file called PlanetWilsonSP2013.js. 2)  Upload it to a