Pre-Fill Event Description?

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
Post Reply
esprit1st
Posts: 7
Joined: August 28th, 2014, 9:59 pm

Pre-Fill Event Description?

Post by esprit1st »

Hi guys,

I would like to pre-fill the description if a user creates a new event.
Is it possible to achieve that somehow?

Thanks for your help!
Esprit
esprit1st
Posts: 7
Joined: August 28th, 2014, 9:59 pm

Re: Pre-Fill Event Description?

Post by esprit1st »

Anybody an idea?
Maybe I wasn't clear enough?

When I create a new event in the calendar, I would like the textarea to be filled already with a certain text.
Is there a way to achieve that?

Thank you!
Esprit
Helicopter Scenic Tours & Flight Training in Oregon
konect-aviation.com
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: Pre-Fill Event Description?

Post by morat »

You would need to hack the extension.

* edit extensions\{e2fda1a4-762b-4020-b5ad-a41df1933103}\chrome\calendar\content\calendar\calendar-event-dialog.js
* restart application

Code: Select all

  // Description
  setElementValue("item-description", item.getProperty("DESCRIPTION"));
+ if (cal.isEvent(item) &&
+     getElementValue("item-title") == "New Event" &&
+     getElementValue("item-description") == "") {
+   setElementValue("item-description", "Abracadabra");
+ }
Last edited by morat on September 17th, 2014, 9:05 pm, edited 1 time in total.
esprit1st
Posts: 7
Joined: August 28th, 2014, 9:59 pm

Re: Pre-Fill Event Description?

Post by esprit1st »

Hi Morat,

Thanks for the help. That doesn't sound too bad of a hack ... :D
I appreciate you looking into it!!

Thank you!
Esprit
Helicopter Scenic Tours & Flight Training in Oregon
konect-aviation.com
esprit1st
Posts: 7
Joined: August 28th, 2014, 9:59 pm

Re: Pre-Fill Event Description?

Post by esprit1st »

Hi Morat,

again a big THANK YOU!! You are my hero. Just integrated your hack and it works like a charm!

THANK YOU, THANK YOU, THANK YOU!

Esprit
Helicopter Scenic Tours & Flight Training in Oregon
konect-aviation.com
esprit1st
Posts: 7
Joined: August 28th, 2014, 9:59 pm

Re: Pre-Fill Event Description?

Post by esprit1st »

Hi guys,

Since the calendar is integrated into Thunderbird since a few versions, this hack doesn't work anymore.
I tried moving it into the new file but nothing happens. It seems like the syntax of the commands and the commands are different.

I would highly appreciate it if someone could help me out and we can get this updated to Thunderbird >38.

Thanks so much!!!
Esprit
Helicopter Scenic Tours & Flight Training in Oregon
konect-aviation.com
esprit1st
Posts: 7
Joined: August 28th, 2014, 9:59 pm

Re: Pre-Fill Event Description?

Post by esprit1st »

Hey guys,

is there anybody out there that has an idea about how to get this working in Thunderbird >38 / Lightning 4.1.0.2?
Or maybe point me in the right direction?

Thank you very much!
Esprit
Helicopter Scenic Tours & Flight Training in Oregon
konect-aviation.com
esprit1st
Posts: 7
Joined: August 28th, 2014, 9:59 pm

Re: Pre-Fill Event Description?

Post by esprit1st »

[double post ... sorry]
Helicopter Scenic Tours & Flight Training in Oregon
konect-aviation.com
morat
Posts: 6403
Joined: February 3rd, 2009, 6:29 pm

Re: Pre-Fill Event Description?

Post by morat »

Post Reply