Class Index | File Index

Classes


Class Alfresco.CalendarView

Extends Alfresco.component.Base
CalendarFullCalendar base component.
Constructor Summary
Constructor Attributes Constructor Name and Description
 
CalendarView constructor.
Field Summary
Field Attributes Field Name and Description
 
View type - must be overridden by subclasses
 
Object container for data
 
Object container for storing event handlers
 
Object container for storing module instances.
 
Object container for storing YUI pop dialog instances.
 
Object container for storing YUI widget instances.
Fields borrowed from class Alfresco.component.Base:
options, services
Method Summary
Method Attributes Method Name and Description
 
add(id, o)
Adds events to view
 
deleteDialog(e, elTarget)
Uses the EventInfo delete method to delete the event after showing a confirmation dialogue.
 
displayMessage(message, name)
 
editDialog(e, elTarget)
Uses the EventInfo edit method to jump straight to the event edit screen.
 
Filters the array of events for multiday events
 
Returns the current date that the user clicked on
 
Returns the Event Data object associated with the element passed in.
 
Retrieves events from server
 
getRel(data)
builds up the relationship string to store the event reference in the DOM.
 
Initialises event handling All events are handled through event
 
Tests if event is valid for view must be within startdate and (enddate-1 second) of current view
 
 
 
 
onCalSelect(e, args)
Handler for when date mini calendar is selected
 
Handler for cancelling dialog
 
onDateSelected(e, args, context)
Updates date field in dialog when date in selected in popup calendar
 
Handler for when an event is deleted
 
Handler for eventEdited event. Updates event in DOM in response to updated event data.
 
Handler for when event is saved
 
Triggered when an event can't be created
 
Handler for event retrieval when events are loaded from the server
 
 
onInteractionEvent(o{object}, args)
Event Delegation handler. Delegates to correct handlers using CSS selectors
 
Fired by YUI when parent element is available for scripting.
 
onTagSelected(e, args)
Handler for when a tag is selected
 
Handler for when today button is clicked
 
Handler for when calendar view is changed (agenda button is clicked)
 
parseRel(element)
retrieves the event object based on the data in the rel string.
 
 
remove(id)
Removes events from view
 
Remove dom elements that represent multiple day events
 
Renders view
 
setUpDialog(e, elTarget, event)
Does the grunt work of setting up the dialogue box for info, edit and delete methods.
 
Displays add dialog
 
showDialog(e, elTarget)
shows edits or add dialog depending on source of event
 
tagFilter(events)
takes the event list and removes any items that aren't tagged with the currently selected tag.
 
Shows/hides the early hours of day (midnight till 7am)
 
update(id, o)
Updates specified event
 
Stub function - to be overridden on the view level (e.g. by CalendarAgendaView_updateTitle)
Methods borrowed from class Alfresco.component.Base:
attachLinkClickListeners, bind, createYUIButtons, destroy, fire, invokeAction, msg, onComponentLoaded, onComponentsLoaded, onReadyWrapper, refresh, setMessages, setOptions
Constructor Detail
Alfresco.CalendarView(htmlId)
CalendarView constructor.
Parameters:
{String} htmlId
The HTML id of the parent element
Returns:
{Alfresco.CalendarView} The new CalendarView instance
Field Detail
{string} calendarView
View type - must be overridden by subclasses
Defined in calendar-view.js.

{object} data
Object container for data
Defined in calendar-view.js.

{object} handlers
Object container for storing event handlers
Defined in calendar-view.js.

{object} modules
Object container for storing module instances.
Defined in calendar-view.js.

{object} popups
Object container for storing YUI pop dialog instances.
Defined in calendar-view.js.

{object} widgets
Object container for storing YUI widget instances.
Defined in calendar-view.js.
Method Detail
{Boolean} add(id, o)
Adds events to view
Defined in calendar-view.js
Parameters:
{String} id
Identifier of event
{Object} o
Event Object
Returns:
{Boolean} Status of add operation

deleteDialog(e, elTarget)
Uses the EventInfo delete method to delete the event after showing a confirmation dialogue.
Defined in calendar-view.js
Parameters:
{Object} e
{Object} elTarget

displayMessage(message, name)
Defined in calendar-view.js
Parameters:
message
name

editDialog(e, elTarget)
Uses the EventInfo edit method to jump straight to the event edit screen.
Defined in calendar-view.js
Parameters:
{Object} e
{Object} elTarget

filterMultiday(events)
Filters the array of events for multiday events
For each Multiday event, it:
- Creates an event for every day in the period.
- If not All day:
- the first day's display end time is set to: 00:00
- the middle days are marked as multiday
- the last day's start time is: 00:00
- Adds cloned tag.

TODO: Currently this is only used by the Agenda view - this needs rolling out across the other views when they get refactored.
Defined in calendar-view.js
Parameters:
{Array} events
Array of event objects

{Date} getClickedDate(el)
Returns the current date that the user clicked on
Defined in calendar-view.js
Parameters:
el
{DOM Element} the element that was clicked on
Returns:
{Date}

getEventObj(data)
Returns the Event Data object associated with the element passed in.
Defined in calendar-view.js
Parameters:
{object} data
either the HTML node of the event or the event data

getEvents()
Retrieves events from server
Defined in calendar-view.js

getRel(data)
builds up the relationship string to store the event reference in the DOM.
Defined in calendar-view.js
Parameters:
{Object} data

initEvents()
Initialises event handling All events are handled through event
delegation via the onInteractionEvent handler
Defined in calendar-view.js

isValidDateForView(date)
Tests if event is valid for view must be within startdate and (enddate-1 second) of current view
Defined in calendar-view.js
Parameters:
date
Returns:
true|false

onAfterEventDeleted(e, args)
Defined in calendar-view.js
Parameters:
e
args

onAfterEventEdited(e, args)
Defined in calendar-view.js
Parameters:
e
args

onAfterEventSaved(e, args)
Defined in calendar-view.js
Parameters:
e
args

onCalSelect(e, args)
Handler for when date mini calendar is selected
Defined in calendar-view.js
Parameters:
{object} e
args

onCancelDialog()
Handler for cancelling dialog
Defined in calendar-view.js

onDateSelected(e, args, context)
Updates date field in dialog when date in selected in popup calendar
Defined in calendar-view.js
Parameters:
{object} e
Event object
{object} args
Event argument object
context

onEventDeleted()
Handler for when an event is deleted
Defined in calendar-view.js

onEventEdited(e, o)
Handler for eventEdited event. Updates event in DOM in response to updated event data.
Defined in calendar-view.js
Parameters:
{object} e
event object
{object} o
new event data

onEventSaved(o)
Handler for when event is saved
Defined in calendar-view.js
Parameters:
{object} o
response object

onEventSaveFailed()
Triggered when an event can't be created
Defined in calendar-view.js

onEventsLoaded(o)
Handler for event retrieval when events are loaded from the server
Used by agenda, day and week (i.e. not month view)
Defined in calendar-view.js
Parameters:
o

onFormValidationError(e, args)
Defined in calendar-view.js
Parameters:
{object} e
Event object
{object} args
Value object referencing elements that are invalid

onInteractionEvent(o{object}, args)
Event Delegation handler. Delegates to correct handlers using CSS selectors
Defined in calendar-view.js
Parameters:
o{object}
DomEvent
{array} args
event arguments

onReady()
Fired by YUI when parent element is available for scripting.
Component initialisation, including instantiation of YUI widgets and event listener binding.
Defined in calendar-view.js

onTagSelected(e, args)
Handler for when a tag is selected
Defined in calendar-view.js
Parameters:
e
args

onTodayNav()
Handler for when today button is clicked
Defined in calendar-view.js

onViewChanged()
Handler for when calendar view is changed (agenda button is clicked)
Defined in calendar-view.js

parseRel(element)
retrieves the event object based on the data in the rel string.
Defined in calendar-view.js
Parameters:
{HTML element} element
with a relationship to an event.

refreshTags()
Defined in calendar-view.js

{Boolean} remove(id)
Removes events from view
Defined in calendar-view.js
Parameters:
{String} id
Identifier of event
Returns:
{Boolean} Status of removal operation

removeMultipleDayEvents(srcEl)
Remove dom elements that represent multiple day events
Defined in calendar-view.js
Parameters:
srcEl

render()
Renders view
Defined in calendar-view.js

setUpDialog(e, elTarget, event)
Does the grunt work of setting up the dialogue box for info, edit and delete methods.
Defined in calendar-view.js
Parameters:
{Object} e
{Object} elTarget
event

showAddDialog(date)
Displays add dialog
Defined in calendar-view.js
Parameters:
date
{Date object} Javascript date object containing the start date for the new event.

showDialog(e, elTarget)
shows edits or add dialog depending on source of event
Defined in calendar-view.js
Parameters:
{object} e
Event object
{object} elTarget
Element in which event occured

tagFilter(events)
takes the event list and removes any items that aren't tagged with the currently selected tag.
Defined in calendar-view.js
Parameters:
{Object} events

toggleEarlyTableRows()
Shows/hides the early hours of day (midnight till 7am)
Defined in calendar-view.js

{Boolean} update(id, o)
Updates specified event
Defined in calendar-view.js
Parameters:
{String} id
Identifier of event
{Object} o
Event Object
Returns:
{Boolean} Status of update operation

updateTitle()
Stub function - to be overridden on the view level (e.g. by CalendarAgendaView_updateTitle)
Defined in calendar-view.js

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Feb 16 2012 12:24:23 GMT-0000 (GMT)