Question

Is there any way to make records that appear on the calendar module (tasks, calls, meetings, etc) appear already as links to the records themselves? in CE 6.5.16, they are just regular text fields and it is the "Info" icon beside them that allows users to navigate to the Detail View of the records.

See here for more info: http://tinypic.com/view.php?pic=2ai31vb&s=8#.U1VnfPldVCY

I'd like to make things easier for my users by making it available from the get-go as a link. And while I've been fiddling around with /modules/Calendar/Cal.js which I believe is the source to make them as the links, I'm not getting any headway. Has anyone made any modifications similar to what I'm trying to do? And is there a way to make it upgrade-safe?

Was it helpful?

Solution

Finally figured out how to fix this, however this is not upgrade safe. I only needed to modify one file: modules/Calendar/Calendar.js. To create the task/meeting/call name as a link to their respective Detail views, you have to put this line:

item.name = item.name.link("http://xxx.x.x.x/<crm-root>/index.php?action=DetailView&module=" +item.module_name + "&record=" + item.record);

after:

time_start="...&nbsp;";          

and before:

var head_text=CAL.get_header_text(item.type,time_start,item.name,item.record);

However, this will only affect the monthly calendar view. To make this change affect the weekly and daily calendar view as well, put the same line after:

CAL.basic.remove(item);if(CAL.style=="basic"||item.days>1){CAL.basic.add(item);return;}

and before:

var head_text=CAL.get_header_text(item.type,item.time_start,item.name,item.record);

These changes will make the names as links however, there are 2 annoying issues that occur. One is that on the weekly and daily view, the status of meetings and calls are usually defined under the name. After the changes, it will be shown as "undefined". To fix this and show back the correct status, do some changes where this line resides:

var el=CAL.create_item({item:item,type:'advanced',head_text:head_text, ...

Find where

"item_text:item_text" 

is within the line and change it to

"item_text:item.status"

There is also the other issue of the edit view pop-up showing when clicking on the meeting or call records on the monthly/daily calendar views. I think I'll fix this in the future but for now this will do.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top