How can I change default reminder times per calendar?

Support topics for the mail/news/chat client
Locked
User avatar
Weboh
Moon lover
Moon lover
Posts: 86
Joined: 2014-09-30, 20:29
Location: Florida

How can I change default reminder times per calendar?

Post by Weboh » 2016-11-19, 04:44

I have two different calendars. I want both of them to get reminders, but I want one to give me reminders a day in advance and the other to give me reminders an hour in advance. I know I can just manually change the time each time I add something to the calendar, but I'd rather Fossamail do it automatically since I always want the same period for each calendar. I posted the question on Mozillaline and got this code which is supposed to work when I add it to calendar-event-dialog.js:

Code: Select all

// load reminder details
loadReminders(item.getAlarms({}));
if (cal.isEvent(item) &&
    getElementValue("item-title") == "New Event" &&
    document.getElementById("item-alarm").selectedIndex == 0) {
  if (item.calendar.name == "Alpha") {
    document.getElementById("item-alarm").selectedIndex = 7; // 1 hour before
  }
  if (item.calendar.name == "Beta") {
    document.getElementById("item-alarm").selectedIndex = 11; // 1 day before
  }
}

// hide rows based on if this is an event or todo
updateStyle();
It doesn't work. I'm assuming that's because I'm using Fossamail and its Lighting extension. What would I need to do to make it work with Fossamail?

Locked