Welcome,
Guest
|
|
I noticed when I click on the edit button while updating an event, the group drop down population goes away. However it remains when you create a new event.
Is this suppposed to happen? How do i get it to populate again when updating an existing event? I\'m assuming its this code which is listing the calendar groups. function onNewEvent(obj, groups, allday)
{
var st = new UTC(obj.startTime);
var ed = new UTC(obj.endTime);
var newevt=jQuery(\"#customNewEventTemplate\");
//Clear out and reset form
newevt.find(\"#eventDescription\").val(\"\").end()
.find(\"#eventName\").val(\"\").focus().end()
.find(\"#eventStartDate\").val( st.toStandardFormat()).end()
.find(\"#eventEndDate\").val(ed.toStandardFormat() ).end();
if(allday)
newevt.find(\"#allDayEvent\").attr(\"checked\", true).end()
.find(\"#eventStartTime\").val(\"\").end()
.find(\"#eventEndTime\").val(\"\");
else
newevt.find(\"#allDayEvent\").attr(\"checked\", false).end()
.find(\"#eventStartTime\").val( st.toNiceTime() ).end()
.find(\"#eventEndTime\").val( ed.toNiceTime() );
//display a list of groups to select from.
var groupDD=newevt.find(\"#eventGroup\").get(0);
removeAllOptions(groupDD);
for(var g in groups)
{
if(!groups.hasOwnProperty(g))continue;
var g = groups[g].groupId;
addOption(groupDD, groups[g].groupName,groups[g].groupId,false);
} //end for
if(obj.group && obj.group.groupId)
newevt.find(\"#eventGroup\").val(obj.group.groupId);
newevt.find(\"#newEvAddEventBtn\").show().end()
.find(\"#newEvUpdateEventBtn\").hide();
} //end onNewEvent |
Please Log in to join the conversation.
phillipkuo.com
|
|
I noticed the editEvent.html and the other examples, the group drop down is also not working.
any ideas on the best way to do this? Is this something available in the commercial version? I would really like to add more database populated drop down options. |
Please Log in to join the conversation.
phillipkuo.com
|
|
Yes, It is very simple in Premium Versions. There are many convenient functions. But you can accomplish the same with Basic also.
Basically, I am keeping the list of groups I provided in a local variable. In Premium, you could call, ical.getAllGroups() to get list of groups. var allEvents; function loadCalendarEvents() { ical.render(events); allEvents = events; } Function editEvent() { var groupDD=newevt.find(\"#eventGroup\").get(0); removeAllOptions(groupDD); for(var g in allEvents) { if(!allEvents.hasOwnProperty(g))continue; var g = allEvents[g].groupId; addOption(groupDD, allEvents[g].groupName,allEvents[g].groupId,false); } //end for } Let me know if this helps |
Please Log in to join the conversation. Team Web2Cal. |
|
I understand you are setting Allgroups to events..
however why do you use events over lists? Where does lists come from in the php-example folder? thanks |
Please Log in to join the conversation.
phillipkuo.com
|