Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
web:calendar [2019/12/04 06:14]
agcyphers
web:calendar [2020/04/16 15:37] (current)
agcyphers [Methods]
Line 6: Line 6:
 ==== Enumerations ==== ==== Enumerations ====
 ^ Name      ^ Values       ^ ^ Name      ^ Values       ^
- This class exposes no enumerations. |+Views Month | 
 +| ::: | Agenda | 
 +| ::: | AgendaWeek | 
 +| ::: | AgendaDay | 
 +| ::: | Basic | 
 +| ::: | BasicWeek | 
 +| ::: | BasicDay | 
 +| ::: | List | 
 +| ::: | ListYear | 
 +| ::: | ListMonth | 
 +| ::: | ListWeek | 
 +| ::: | ListDay | 
  
 ==== Constants ==== ==== Constants ====
Line 18: Line 30:
 ==== Events ==== ==== Events ====
 ^ Definition      ^ Description       ^ ^ Definition      ^ Description       ^
 +| DateDoubleClick( theDate as Date ) | Raised when the user double clicks a date/time. |
 | DateSelected( DateStart as Date, DateEnd as Date = nil, StartTime as Boolean = False, EndTime as Boolean = False ) | Raised when the user clicks on a day/time on the calendar. | | DateSelected( DateStart as Date, DateEnd as Date = nil, StartTime as Boolean = False, EndTime as Boolean = False ) | Raised when the user clicks on a day/time on the calendar. |
 | EventChanged( theEvent as GraffitiWebCalendarEvent ) | Fires when the user changes an event (such as by dragging). | | EventChanged( theEvent as GraffitiWebCalendarEvent ) | Fires when the user changes an event (such as by dragging). |
 +| EventDoubleClick( theEvent as GraffitiWebCalendarEvent, atDate as Date ) | Raised when the user double-clicks an event. |
 | EventMouseEnter( theEvent as GraffitiWebCalendarEvent, X as Integer, Y as Integer ) | Raised when the user moves their mouse in to an event. | | EventMouseEnter( theEvent as GraffitiWebCalendarEvent, X as Integer, Y as Integer ) | Raised when the user moves their mouse in to an event. |
 | EventMouseLeave( theEvent as GraffitiWebCalendarEvent ) | Raised when the use moves their mouse out of an event. | | EventMouseLeave( theEvent as GraffitiWebCalendarEvent ) | Raised when the use moves their mouse out of an event. |
-| EventSelected( theEvent as GraffitiWebCalendarEvent ) | Raised when the user clicks an event. |+| EventSelected( theEvent as GraffitiWebCalendarEvent, atDate as Date ) | Raised when the user clicks an event. |
 | LanguagesLoaded( CalLanguages() as String ) | This event is raised once the calendar has completely loaded the list of available languages, and facilitates dynamic locale selection. | | LanguagesLoaded( CalLanguages() as String ) | This event is raised once the calendar has completely loaded the list of available languages, and facilitates dynamic locale selection. |
 | ViewChanged( NewView as Integer, StartDate as Date, EndDate as Date ) | Fired when the user changes the view (IE: from Month to Week to Day). | | ViewChanged( NewView as Integer, StartDate as Date, EndDate as Date ) | Fired when the user changes the view (IE: from Month to Week to Day). |
Line 31: Line 45:
 | AddExternalSource( URL as String, BGColor as Color = &c3a87ad, BorderColor as Color = &c3a87ad, TextColor as Color = &cFFFFFF ) | Add an external source to the calendar, such as a Google Calendar feed. | | AddExternalSource( URL as String, BGColor as Color = &c3a87ad, BorderColor as Color = &c3a87ad, TextColor as Color = &cFFFFFF ) | Add an external source to the calendar, such as a Google Calendar feed. |
 | AddRestriction( theRestriction as [[web:calendarrestriction|GraffitiWebCalendarRestriction]] ) | Adds a view restriction. | | AddRestriction( theRestriction as [[web:calendarrestriction|GraffitiWebCalendarRestriction]] ) | Adds a view restriction. |
 +| AddViewButton(View as Views) | Adds a new view button to the right-hand side of the header. |
 | DayTitle(Day as Date) as String | Returns the title set for the specified date. | | DayTitle(Day as Date) as String | Returns the title set for the specified date. |
 | DayTitle(Day as Date, Title as String, Style as WebStyle = Nil) | Sets the day title with optional style for a date. | | DayTitle(Day as Date, Title as String, Style as WebStyle = Nil) | Sets the day title with optional style for a date. |
Line 47: Line 62:
 | RemoveAllEvents() | Removes all events from the calendar. | | RemoveAllEvents() | Removes all events from the calendar. |
 | RemoveAllRestrictions() | Removes all restrictions from the calendar view. | | RemoveAllRestrictions() | Removes all restrictions from the calendar view. |
 +| RemoveAllViewButtons() | Removes all view buttons. |
 | RemoveEvent( theEvent as GraffitiWebCalendarEvent ) | Remove the supplied event object from the calendar. | | RemoveEvent( theEvent as GraffitiWebCalendarEvent ) | Remove the supplied event object from the calendar. |
 | RemoveExternalSource( URL as String ) | Remove the external source signified by URL. | | RemoveExternalSource( URL as String ) | Remove the external source signified by URL. |
 | RemoveRestriction( theID as String ) | Removes a restriction from the calendar view. | | RemoveRestriction( theID as String ) | Removes a restriction from the calendar view. |
 +| RemoveViewButton(index as Integer) | Removes the specified view button. |
 | RerenderEvents() | Forces the calendar to rerender all events.  Useful if you notice any weirdness. | | RerenderEvents() | Forces the calendar to rerender all events.  Useful if you notice any weirdness. |
 | SelectDates( StartDate as Date, EndDate as Date ) | Selects a range of dates in the view. | | SelectDates( StartDate as Date, EndDate as Date ) | Selects a range of dates in the view. |
 | UpdateEvent( theEvent as GraffitiWebCalendarEvent ) | Updates theEvent.  The GraffitiWebCalendarEvent object passed should be the same one that has been modified. | | UpdateEvent( theEvent as GraffitiWebCalendarEvent ) | Updates theEvent.  The GraffitiWebCalendarEvent object passed should be the same one that has been modified. |
 +| ViewButton(index as Integer) as Views | Returns the view button at the specified index. |
 +| ViewButtonCount() as Integer | Returns the number of View buttons. |
  
 ==== Properties ==== ==== Properties ====
Line 58: Line 77:
 | CalendarView | Integer | 0 | The current view state. | | CalendarView | Integer | 0 | The current view state. |
 | CustomTheme | Boolean | False | Determines whether the calendar is to use a custom theme.  This can either be in the form of the WebStyle properties, or a jQuery UI theme CSS file added to the page with a WebPageSource. | | CustomTheme | Boolean | False | Determines whether the calendar is to use a custom theme.  This can either be in the form of the WebStyle properties, or a jQuery UI theme CSS file added to the page with a WebPageSource. |
 +| DisplayEventTime | Boolean | True | Controls the visibility of time in the event display. |
 | Editable | Boolean | True | Determines if events are editable in the display by, for example, dragging. | | Editable | Boolean | True | Determines if events are editable in the display by, for example, dragging. |
 | Events() | GraffitiWebCalendarEventItem | Nil | The array of events that the calendar currently contains. | | Events() | GraffitiWebCalendarEventItem | Nil | The array of events that the calendar currently contains. |
Line 65: Line 85:
 | ShowMonthButton | Boolean | True | Determines if the "Month" view selector is visible. | | ShowMonthButton | Boolean | True | Determines if the "Month" view selector is visible. |
 | ShowNavButtons | Boolean | True | Determines if the Prev/Next navigation buttons are visible. | | ShowNavButtons | Boolean | True | Determines if the Prev/Next navigation buttons are visible. |
 +| ShowNavButtonsAtToday | Boolean | True | When True, shows the navigation buttons on either side of the Today button. |
 | ShowTitle | Boolean | True | Whether the calendar shows the title (IE: October 2014). | | ShowTitle | Boolean | True | Whether the calendar shows the title (IE: October 2014). |
 | ShowTodayButton | Boolean | True | Determines if the Today button is displayed. | | ShowTodayButton | Boolean | True | Determines if the Today button is displayed. |