Zimlet JavaScript API Reference - ZmCalViewController

Class ZmCalViewController


Extends ZmListController.

The strategy for the calendar is to leverage the list view stuff by creating a single view (i.e. ZmCalViewMgr) and have it manage the schedule views (e.g. week, month) and a single calendar view (the calendar widget to the right). Each of the schedule views will be a list view that are managed by the ZmCalViewMgr.

To do this we have to trick the ZmListController. Specifically we have only one toolbar and directly manipulate this._toolbar elements to point to a single instance of the toolbar. We also directly override the ZmListControl.initializeToolBar method.

Defined in: ZmCalViewController.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ZmCalViewController(container, calApp, sessionId, searchResultsController)
Creates the calendar view controller.
Method Summary
Method Attributes Method Name and Description
 
createAppointmentFromOOOPref(startDate, endDate, allDay, respCallback)
Creates appointment as configured in the out-of-office preference
 
editAppointment(appt, mode)
Edits the appointment.
 
Gets the first day of week setting.
 
getCalendar(folderId)
Gets the calendar by folder id.
 
getCalendarColor(folderId)
Gets the calendar color.
 
getCalendarName(folderId)
Gets the calendar name.
 
getCalendars(params)
Gets the calendar for the specified account.
 
Gets the calendar tree controller.
 
getCheckedCalendarFolderIds(localOnly, includeTrash)
Gets the checked calendar folder ids.
 
getCheckedCalendars(overviewId)
Gets the checked calendars.
 
Gets the checked organizer IDs.
 
getCheckedOrganizers(includeTrash, acct)
Gets the checked organizers.
 
getDayToolTipText(date, noheader, callback, getSimpleToolTip, getSimpleToolTip)
Gets the day tool tip text.
 
getOwnedCalendarIds(localOnly, includeTrash)
Gets the checked calendar folder ids.
 
Gets the calendar folder ids used to create reminders.
 
Gets the unchecked calendar folder ids for a owner email
 
newApptFromContact(contact, date)
This method will create a new appointment from a contact.
 
newApptFromEmailAddr(emailAddr, date)
This method will create a new appointment from an email address.
 
newApptFromMailItem(mailItem, date)
This method will create a new appointment from a conversation/mail message.
 
Sets the current view.
 
setDate(date, duration, roll)
Sets the date.
 
Updates the time indicator strip.
Methods borrowed from class ZmListController:
getCurrentSearchResults, getItemCount, getItems, getList, getListView, getSearchString, getSearchStringHint, getTabGroup, handleKeyAction, isDraftsFolder, isOutboxFolder, isSyncFailuresFolder, setHasMore, setList, show
Methods borrowed from class ZmBaseController:
getCurrentToolbar, getCurrentView, getItemView, isCurrent, setSessionId
Methods borrowed from class ZmController:
getApp, getCurrentViewId, getCurrentViewType, getKeyMapName, getNewFolderCallback, getSessionId, getViewElements, isTransient, mapSupported, popupErrorDialog, popupUploadErrorDialog, setCurrentViewId, setCurrentViewType
Class Detail
ZmCalViewController(container, calApp, sessionId, searchResultsController)
Creates the calendar view controller.
Parameters:
{DwtComposite} container
the containing element
{ZmCalendarApp} calApp
the handle to the calendar application
{string} sessionId
the session id
{ZmSearchResultsController} searchResultsController
containing controller
Method Detail
createAppointmentFromOOOPref(startDate, endDate, allDay, respCallback)
Creates appointment as configured in the out-of-office preference
Parameters:
startDate
endDate
allDay
respCallback

editAppointment(appt, mode)
Edits the appointment.
Parameters:
{ZmAppt} appt
the appointment
{constant} mode
the mode

{int} firstDayOfWeek()
Gets the first day of week setting.
Returns:
{int} the first day of week index

{ZmCalendar} getCalendar(folderId)
Gets the calendar by folder id.
Parameters:
{String} folderId
the folder id
Returns:
{ZmCalendar} the calendar

{String} getCalendarColor(folderId)
Gets the calendar color.
Parameters:
{String} folderId
the folder id
Returns:
{String} the color

{String} getCalendarName(folderId)
Gets the calendar name.
Parameters:
{String} folderId
the folder id
Returns:
{String} the name

{Array} getCalendars(params)
Gets the calendar for the specified account.
Parameters:
{Hash} params
Param hash
{Boolean} params.includeLinks
if true, include links
{Boolean} params.onlyWritable
if true only writable calendars
{ZmAccount} params.account
the account
Returns:
{Array} an array of {ZmCalendar} objects

{ZmCalendarTreeController} getCalTreeController()
Gets the calendar tree controller.
Returns:
{ZmCalendarTreeController} the controller

{Array} getCheckedCalendarFolderIds(localOnly, includeTrash)
Gets the checked calendar folder ids.
Parameters:
{Boolean} localOnly
if true, include local calendars only
includeTrash
Returns:
{Array} an array of folder ids

{Array} getCheckedCalendars(overviewId)
Gets the checked calendars.
Parameters:
{String} overviewId
the overview id
Returns:
{Array} an array of {ZmCalendar} objects

{Array} getCheckedOrganizerIds()
Gets the checked organizer IDs.
Returns:
{Array} array of strings

{Array} getCheckedOrganizers(includeTrash, acct)
Gets the checked organizers.
Parameters:
includeTrash
acct
Returns:
{Array} array of {ZmOrganizer}

getDayToolTipText(date, noheader, callback, getSimpleToolTip, getSimpleToolTip)
Gets the day tool tip text.
Parameters:
{Date} date
the date
{Boolean} noheader
if true, do not include tool tip header
{AjxCallback} callback
the callback
{Boolean} getSimpleToolTip
if true,show only plain text in tooltip for all day events. Multi day "appts/allday events" would be shown by just one entry showing final start/end date&time.
getSimpleToolTip

{Array} getOwnedCalendarIds(localOnly, includeTrash)
Gets the checked calendar folder ids.
Parameters:
{Boolean} localOnly
if true, include local calendars only
includeTrash
Returns:
{Array} an array of folder ids

{Array} getReminderCalendarFolderIds()
Gets the calendar folder ids used to create reminders. All local calendars and shared calendars with the reminder flag set, checked or unchecked. Does not include the trash folder.
Returns:
{Array} an array of folder ids

{Array} getUncheckedCalendarIdsByOwner(ownerEmailId)
Gets the unchecked calendar folder ids for a owner email
Parameters:
{String} ownerEmailId
email id of the owner account
Returns:
{Array} an array of folder ids

newApptFromContact(contact, date)
This method will create a new appointment from a contact.
Parameters:
{ZmContact} contact
the contact
{Date} date
the date/time for the appointment

newApptFromEmailAddr(emailAddr, date)
This method will create a new appointment from an email address.
Parameters:
{String} emailAddr
the email address
{Date} date
the date/time for the appointment

newApptFromMailItem(mailItem, date)
This method will create a new appointment from a conversation/mail message. In the case of a conversation, the appointment will be populated by the first message in the conversation (or matched msg in the case of a search). This method is asynchronous and will return immediately if the mail message must load in the background.
Parameters:
{ZmConv|ZmMailMsg} mailItem
the may either be a conversation of message
{Date} date
the date/time for the appointment

setCurrentListView(view)
Sets the current view.
Parameters:
{ZmListView} view
the view

setDate(date, duration, roll)
Sets the date.
Parameters:
{Date} date
the date
{int} duration
the duration
{Boolean} roll
if true, roll

updateTimeIndicator(viewId)
Updates the time indicator strip.
Parameters:
viewId

Documentation generated by JsDoc Toolkit 2.3.0 on Tue Jun 28 2016 21:01:33 GMT-0400 (EDT)