Issue 648: Option to only display timeslot headings at hourly intervals
Status:  Duplicate
Merged:  issue 633
Owner: ----
Closed:  Oct 2010
Reported by craveli...@gmail.com, Sep 25, 2010
I need to use a small slotMinutes value (5) but want to avoid a huge vertical scroll in the agenda views.  What I'd like to do is have an option that allows you to only write the timeslot headings at hourly intervals.  

I've worked up a sample that accomplishes the goal for my scenario.  It involved a small change to the renderAgenda method.  Basically I look for the hourly table rows and then rowspan the th.  Also, I adjusted the slot-height to 5px via a css override.

Here's the related code snippets from agenda.js.  You'll have to forgive the ugly code.  I was just trying to see if I could make it work.  You'll notice I hard coded the rowspan value.  That will have to be a calculated value if this option is set.  (rowspan = 60/slotMinutes)

Was...
----------------------------------
s += "<tr class='" +
	(!i ? 'fc-first' : (!minutes ? '' : 'fc-minor')) +
	"'><th class='fc-axis fc-leftmost " + tm + "-state-default'>" +
	((!slotNormal || !minutes) ? formatDate(d, options.axisFormat) : '&nbsp;') + 
	"</th><td class='fc-slot" + i + ' ' +
		tm + "-state-default'><div style='position:relative'>&nbsp;</div></td></tr>";

My changes...
----------------------------------
s += "<tr class='" +
	(!i ? 'fc-first' : (!minutes ? '' : 'fc-minor')) + "'>";
if (!minutes) {
	// we're starting a new hour - write the header
	s += "<th class='fc-axis fc-leftmost " + tm + "-state-default' rowspan='12'>" + 
		(!minutes ? formatDate(d, options.axisFormat) : '&nbsp;') + 
		"</th>";
}
s += "<td class='fc-slot" + i + ' ' +
		tm + "-state-default'><div style='position:relative'>&nbsp;</div></td></tr>";



Sep 25, 2010
#1 craveli...@gmail.com
Might be related to 633.
Oct 7, 2010
Project Member #2 adamrs...@gmail.com
(No comment was entered for this change.)
Status: Duplicate
Mergedinto: 633