| Issue 648: | Option to only display timeslot headings at hourly intervals | |
| 2 people starred this issue and may be notified of changes. | Back to list |
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) : ' ') +
"</th><td class='fc-slot" + i + ' ' +
tm + "-state-default'><div style='position:relative'> </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) : ' ') +
"</th>";
}
s += "<td class='fc-slot" + i + ' ' +
tm + "-state-default'><div style='position:relative'> </div></td></tr>";
Sep 25, 2010
#1
craveli...@gmail.com
Oct 7, 2010
(No comment was entered for this change.)
Status:
Duplicate
Mergedinto: 633 |
|
| ► Sign in to add a comment |