MozillaZine

Pre-Fill Event Description?

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

Post Posted August 28th, 2014, 10:03 pm

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

Post Posted September 15th, 2014, 4:34 pm

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: 3784
Joined: February 3rd, 2009, 6:29 pm

Post Posted September 17th, 2014, 9:01 pm

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

Post Posted September 17th, 2014, 9:05 pm

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

Post Posted September 17th, 2014, 9:32 pm

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

Post Posted July 28th, 2015, 3:52 pm

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

Post Posted August 5th, 2015, 6:33 pm

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

Post Posted August 5th, 2015, 6:37 pm

[double post ... sorry]
Helicopter Scenic Tours & Flight Training in Oregon
konect-aviation.com

morat
 
Posts: 3784
Joined: February 3rd, 2009, 6:29 pm

Post Posted August 6th, 2015, 11:14 pm


Return to Calendar


Who is online

Users browsing this forum: No registered users and 1 guest