Menu
Welcome, Guest
Username: Password: Secret Key Remember me
Welcome to the Developer forum!
Get all your questions answered here. Learn to integrate calendar in your application.
  • Page:
  • 1

TOPIC: deleteEvent() and Move/Resize popup

deleteEvent() and Move/Resize popup 8 years 3 months ago #415

  • computingaustralia
  • computingaustralia's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
Hi,

Is there an option or way to make deleteEvent() remove all events in a recurring cycle? In web2cal version 2.0-64, each instance of a recurring event is given a unique ID (eg, \"[event id]--[instance date]\"), and so when deleteEvent() is called with the event id, no instances are removed because each instance has the unique \"--[instance date]\" appended to the end of its ID - so no matching event is found to delete.

deleteEvent() is described on this page: www.web2cal.com/developer-guide/public-methods .
At the moment, the only way we\'ve been able to counteract this is to split the event id by \"--\", delete the event in the database that corresponds to the first item of that split, then reload all events using the loadEvents callback (in our case: loadCalendarEvents());

Is there a better way to do this?

Also, when an event is moved or resized, a popup is generated that asks the user: \"Would you like to change only this event, or all events in the series?\" It provides options for \"Only this instance\", \"All events in the series\", and \"Cancel\". We do not presently require this functionality (editing specific instances) so is there an option to disable this?

Thanks very much for your time.

Please Log in or Create an account to join the conversation.

Re:deleteEvent() and Move/Resize popup 8 years 2 months ago #416

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 142
  • Karma: 1
  • Thank you received: 1
To delete the entire series,
just invoke ical.deleteEvent( {eventId: <mainEventID>} ). If you don\'t have the mainEventID, and just have one of the repeating event, you can access mainEventID by invoking relEventID.

This function will delete the event from Web2Cal Cache and re-paint the events. No call to loadEvents is necessary. This functionality is demoed in the \"mailcalendardemo.php\" in the package.

Regarding the popup:
You can override the default functionality by providing your own custom \"onRecEventUpdate\" method like
	function onRecEventUpdate(event)
	{  
             updateInDatabase( event, function(postupdateev){ical.updateEvent(postupdateev)} );
	
	}

I hope this helps. If you need further help, feel free to email This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in or Create an account to join the conversation.


Team Web2Cal.
  • Page:
  • 1
Time to create page: 0.593 seconds
Powered by Kunena Forum

LATEST IN FORUM

  • No posts to display.

ABOUT US