Author Topic: Prompted for task not event creation on calendar  (Read 5222 times)

vsarrfengoffice

  • Newbie
  • *
  • Posts: 2
    • View Profile
Prompted for task not event creation on calendar
« on: May 16, 2014, 09:05:56 am »
Hello everyone,

I started using fengoffice a couple of weeks ago and found that it would suit my needs better if on calendar click a new task would be added and not an event.

A quick and dirty way to achieve that was to create a new function in og.js (public/assets/javascript/og/og.js)
og.addcustomtask = function(){
   var url = og.getUrl('task', 'add_task');   
   og.openLink(url/*, {caller: 'tasks-panel'}*/);      
}

and then replace the relevant event functions in application/views/event/

in file calendar.php, replace showMonthEventPopUp function with ours
in file viewdate.php, viewweek.php, viewweek5days.php  replace og.showEventPopup with ours.

Just in case anyone else needs this functionality in an easy way,this should help him