Tweaking Google calendar gadget

  • 1
  • Question
  • Updated 4 years ago
  • Answered
  • (Edited)
I've got a presentation with daily events via the Google calendar gadget running in tabs to show today and tomorrow and I've been thinking about tweaking it a bit.  To do so, I understand that I would need to grab the JSON source from, make modifications and then add it as my own custom gadget under the "Gadgets" menu.

So far, so good.  Though I have a programming background, JSON is not among the list of languages I've learned as of yet.  Since a particular venue has many events during the day, rather than having all of them (that have already taken place during the day) scroll by in the evening, it would be useful if you could do something like display only those events with a start time after 6 pm.   Since that functionality is not in the current gadget, I thought about modifying it, and using a separate presentation after 6 pm that would use this custom gadget.

Looking at the Events.js file, it seems like this could be done in RiseVision.Events.EventWidget.prototype.showEvents starting at line 494, and more specifically around line 531 (//Add event to appropriate day) with some sort of "if" check.

Am I on the right track here?  Any thoughts on how I could modify the code to accomplish this?

Photo of FAC Signage

FAC Signage

  • 732 Points 500 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Donna Peplinskie

Donna Peplinskie

  • 7,142 Points 5k badge 2x thumb
I wanted to let you know that, if possible, it may be best for you to hold off on making any changes to the Gadget. We're currently working on rewriting the Gadget to a Widget, which should be available within a few weeks. This isn't functionality that will be included in a first release of the Widget, so you'll still need to customize it, but I just wanted to prevent you from having to do the same work twice.

Photo of FAC Signage

FAC Signage

  • 732 Points 500 badge 2x thumb
Thanks for the speedy reply (and the heads up) Donna!   Now that I think of it a bit more, it would seem to me to be a generally useful feature - maybe a checkbox toggle that would give the option of hiding events that have already ended.  If I'm a patron and coming to see information about the event I'm to attend in the evening, I wouldn't necessarily care to see events that have already concluded earlier in the day on the schedule.

Anyway, hopefully this could be a future enhancement.  In the meantime, I look forward to the new widget announcement and tackling it myself.