Welcome,
Guest
|
|
We have utilized some methods: “show activities from earliest event” . It gives users ability to see earliest event at first loading of the calendar. The user doesn’t have to scroll down to check out for the first event if it’s appeared later afternoon and not seen when calendar is just loaded. The method will do it for user.
function cb_loadCalendarEvents(list){ ical.render(list); var top=findEarliestEvent(list,howmany); //howmany - is a String //parameter of how many people //selected for the scheduler(passed with link) var grid=jQuery("#calbodyContainer").get(0); grid.scrollTop=(top==670)?grid.scrollHeight:top; } /*----Find the earliest event to make a grid offset */ var evId; var evTop; function findEarliestEvent(vents,howmany){ evTop=670;//<-full size of the grid for(var i=0; i<parseInt(howmany); i++){ for(var j in vents.events){ var number='#event'+vents.events[j].eventId; //”eventId” includes numbers only evId=eval('jQuery("'+number+'").get(0)'); var vSt=parseInt(evId.style.top.substring(0,evId.style.top.indexOf('px')),10); //get digits only evTop=(evSt<evTop)?evSt:evTop; } } return evTop; } |
Please Log in to join the conversation. |