IRISLIB database
schedulePane Class Reference

Displays a daily schedule for a given time period as an HTML component. More...

Inheritance diagram for schedulePane:
Collaboration diagram for schedulePane:

Public Member Functions

 getDropTimeSlot ()
 Return information about the most recent. More...
 
 mouseClickHandler (evt, type, time, cellId, userId, duration)
 Mouse click handler
More...
 
 mouseDownHandler (evt)
 Grab mouse down to prevent text selection.
 
 moveToNewDay (delta)
 Move ahead or back the given number of days.
 
 nextPeriod ()
 Display the next time period.
 
 onRefreshContents ()
 This client callback is called just from refreshContents. More...
 
 previousPeriod ()
 Display the previous time period.
 
 setDate (date)
 Set the <property>date</property> mode of this control.
 
 setInterval (interval)
 Set the <property>interval</property> property of this control.
 
 setProperty (property, value, value2)
 Set the value of a named property.
 
 setView (view)
 Set the <property>view</property> mode of this control.
 
- Public Member Functions inherited from component
 dragFinishHandler (dragData)
 This is called when a drag operation started within this component. More...
 
 dragHandler ()
 This is called by the layout manager when a drag-and-drop operation. More...
 
 dragNotifyHandler (dragData)
 This is called by the layout manager when a drag operation. More...
 
 dragStartHandler (dragData)
 This is called when a drag operation is started within this component. More...
 
 dropHandler ()
 This is called by the layout manager when a drag-and-drop operation. More...
 
 dropStartHandler (dragData)
 This is called when a data drop operation is started within this component. More...
 
 exposeComponent ()
 This manages the ondisplay event callback handling. More...
 
 getEnclosingDiv ()
 Client-side method returns the div element that encloses. More...
 
_.Library.String getHidden ()
 Return whether this component is hidden.
 
 getHintElement ()
 Client-side method returns the HTML element that displays. More...
 
 getLabelElement ()
 Client-side method returns the HTML element that displays. More...
 
 onDisplayHandler ()
 This client callback is called from exposeComponent after. More...
 
 onEndModalHandler (zindex)
 Notification that this component is about to stop being modal.
 
 onPopupAction (popupName, action, value)
 This client event, if present, is fired when a popup page has specified. More...
 
 onStartModalHandler (zindex)
 Notification that this component is about to become modal. More...
 
 refreshContents (sync)
 This method, called from a client page, invokes this component's. More...
 
 setHidden (flag)
 If flag is true, hide this component. More...
 
 setOverlayMode (mode)
 Expirimental: do not use. More...
 
 startProgressBar (div)
 Start the display of a progress bar within display. More...
 
 stopProgressBar ()
 Stop the timer used by the Progress bar.
 
- Public Member Functions inherited from object
_.Library.Status OnNew (_.Library.RawString initvalue)
 Constructor for Zen objects. More...
 
 findElement (subid)
 Client-side utility method that finds an HTML element with a. More...
 
 fireOnUpdateEvent ()
 This is called when an object is updated from the server. More...
 
_.Library.String getProperty (property, key)
 Return the value of a named property (i.e. More...
 
 getSettings (settings)
 Client-side method that returns a list of this component's. More...
 
 getType ()
 Returns the component type of this object. More...
 
 invokeSuper (method, args)
 Invoke the superclass method method of the current. More...
 
 isOfType (type)
 Returns true if this object is of the given component type. More...
 
 makeId (subid)
 client-side utility method that constructs a component-specific id More...
 
 onCreate ()
 This client method, if present, is called when this component is. More...
 
 onDelete ()
 This client method, if present, is called when this component is. More...
 
 onSerialize ()
 This client event, if present, is fired before a component. More...
 
 onloadHandler ()
 This client event, if present, is fired when the page is loaded.
 
 onunloadHandler ()
 This client event, if present, is fired when the page is unloaded. More...
 
 onupdateHandler ()
 This client method, if present, is fired when the object is updated from the server.
 
 render ()
 This causes a component that draws its contents dynamically. More...
 
 renderContents ()
 This method, if present, is called when this component. More...
 
 renderSVG (document, parent)
 This method is only needed for SVG components. More...
 
- Public Member Functions inherited from RegisteredObject
_.Library.Status OnAddToSaveSet (_.Library.Integer depth, _.Library.Integer insert, _.Library.Integer callcount)
 This callback method is invoked when the current object is added to the SaveSet,. More...
 
_.Library.Status OnClose ()
 This callback method is invoked by the <METHOD>Close</METHOD> method to. More...
 
_.Library.Status OnConstructClone (_.Library.RegisteredObject object, _.Library.Boolean deep, _.Library.String cloned)
 This callback method is invoked by the <METHOD>ConstructClone</METHOD> method to. More...
 
_.Library.Status OnNew ()
 This callback method is invoked by the <METHOD>New</METHOD> method to. More...
 
_.Library.Status OnValidateObject ()
 This callback method is invoked by the <METHOD>ValidateObject</METHOD> method to. More...
 
- Public Member Functions inherited from Adaptor
_.Library.Status XMLExport (_.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent, _.Library.Boolean local, _.Net.MIMEPart mimeAttachments)
 Serialize an XML enabled class as an XML document and write. More...
 
_.Library.Status XMLExportToStream (_.Stream.Object export, _.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent)
 Serialize an XML enabled class as an XML document and appends it to a stream. More...
 
_.Library.Status XMLExportToString (_.Library.String export, _.Library.String top, _.Library.String format, _.XML.Namespaces namespaces, attrs, _.Library.String createId, _.Library.String typeAttr, oreflist, idlist, _.Library.String initialIndent)
 Serialize an XML enabled class as an XML document and write it to a string. More...
 

Public Attributes

 OnGetScheduleInfo
 Name of Server-side callback method to call to get information. More...
 
 caption
 If provided, this text is displayed as a caption. More...
 
 cellHeight
 Height of time slot cell. More...
 
 date
 Date to display (in YYYY-MM-DD format). More...
 
 dateFormat
 Date format used for sub-caption. More...
 
 dayList
 List of localized day names. More...
 
 endTime
 Ending time (in minutes from midnight) to show for the daily. More...
 
 firstDayOfWeek
 Specified which day of the week (Sunday=0, Saturday = 6) is displayed as. More...
 
 headerHeight
 Height of header cells. More...
 
 interval
 Specifies the size (duration) of the calendar slots (in minutes). More...
 
 monthList
 List of localized month names. More...
 
 onchangeview
 onchangeview event handler: More...
 
 onselectitem
 onselectitem event handler: More...
 
 parameters
 User-defined set of parameters. More...
 
 selectedInterval
 Length (in minutes) of the current selected cell(s). More...
 
 selectedTime
 Start time of the current selected cell(s). More...
 
 shortDayList
 List of localized short day names. More...
 
 shortMonthList
 List of localized short month names. More...
 
 startTime
 Starting time (in minutes from midnight) to show for the daily. More...
 
 view
 Specifies what type of schedule to display. More...
 
- Public Attributes inherited from component
 align
 Specifies how this component should be horizontally aligned within its layout cell. More...
 
 containerStyle
 CSS style applied to the td element used to contain this child component within. More...
 
 dragEnabled
 If this value is true and dragAndDrop is enabled for the page, then. More...
 
 dropEnabled
 If this value is true and dragAndDrop is enabled for the page, then. More...
 
 enclosingClass
 Optional CSS class used for this component's enclosing div. More...
 
 enclosingStyle
 Optional CSS style applied to this component's enclosing div. More...
 
 error
 Run-time value; Set to indicate an error within this component. More...
 
 height
 Specifies the height of this component with respect to its container. More...
 
 hidden
 If true, this component is hidden. More...
 
 hint
 User defined hint text used to display additional hint text for this component. More...
 
 hintClass
 Optional CSS class used for the component hint. More...
 
 hintStyle
 User defined style used for the component hint. More...
 
 label
 User defined label used to label this component. More...
 
 labelClass
 Optional CSS class used for the component label. More...
 
 labelDisabledClass
 Optional CSS class used for the component label when disabled. More...
 
 labelStyle
 User defined style used for the component label. More...
 
 onafterdrag
 onafterdrag event handler: More...
 
 onbeforedrag
 onbeforedrag event handler: More...
 
 ondrag
 ondrag event handler: More...
 
 ondrop
 ondrop event handler: More...
 
 onhide
 onhide event handler: More...
 
 onrefresh
 onrefresh event handler: More...
 
 onshow
 onshow event handler: More...
 
 showLabel
 Controls whether a label is displayed for this component. More...
 
 slice
 User-defined number of units of relative space this. More...
 
 title
 Help text (tool tip) displayed when mouse hovers over this component (or its label). More...
 
 valign
 Specifies how this component should be vertically aligned within its layout cell. More...
 
 width
 Specifies the width of this component with respect to its container. More...
 
- Public Attributes inherited from object
 aux
 @qualifier final This is an auxiliary property that is provided More...
 
 composite
 @qualifier final For components that are created as part of a composite component, More...
 
 id
 @qualifier final This is a unique identifier that is used to distinguish this object More...
 
 index
 @qualifier final System-assigned index number used internally to identify this component. More...
 
 name
 @qualifier final Name of this object. More...
 
 onupdate
 onupdate event handler: More...
 
 parent
 @qualifier final Link to the component that contains this object More...
 
 tuple
 @qualifier final Special property indicating which tuple of a More...
 
 visible
 This property indicates whether a component is visible and thus layed out. More...
 
 window
 @qualifier final This is a client-only property that refers to the JavaScript More...
 

Static Public Attributes

 DOMAIN = None
 Localization domain.
 
- Static Public Attributes inherited from component
 DEFAULTENCLOSINGCLASS = None
 Subclasses can set this to change default enclosingClass used for this. More...
 
 DEFAULTHEIGHT = None
 Subclasses can set this to change default height for a component.
 
 DEFAULTHIDDEN = None
 Subclasses can set this to change default hidden property for a component.
 
 DEFAULTHINTCLASS = None
 Subclasses can set this to change default css class used for hints.
 
 DEFAULTLABELCLASS = None
 Subclasses can set this to change default css class used for labels.
 
 DEFAULTLABELDISABLEDCLASS = None
 Subclasses can set this to change default css class used for disabled labels.
 
 DEFAULTVISIBLE = None
 Subclasses can set this to change default visibilty for a component.
 
 DEFAULTWIDTH = None
 Subclasses can set this to change default width for a component.
 
- Static Public Attributes inherited from object
 DEFAULTVISIBLE = None
 Subclasses can set this to change default visibilty for a component.
 
 INCLUDEFILES = None
 CSV list of additional include files (either .js or .css) that. More...
 
 MODULE = None
 If set, this indicates that this system component should be. More...
 
 NAMESPACE = None
 This is the XML namespace used for library components.
 
 POSTCOMPILEACTIONS = None
 This is a comma-delimited list of which post-compile actions this component. More...
 
 USECOMMONDIRECTORY = None
 If true, then the include files generated for this component, are placed in the. More...
 
 XMLFORMAT = None
 If XMLFORMAT="Literal", then only support for literal format import and export is generated. More...
 
 XMLIGNOREINVALIDATTRIBUTE = None
 By setting this to 0, we disallow use of invalid attribute names in Zen XML documents.
 
- Static Public Attributes inherited from RegisteredObject
 CAPTION = None
 Optional name used by the Form Wizard for a class when generating forms. More...
 
 JAVATYPE = None
 The Java type to be used when exported.
 
 PROPERTYVALIDATION = None
 This parameter controls the default validation behavior for the object. More...
 
- Static Public Attributes inherited from Adaptor
 ATTRIBUTEQUALIFIED = None
 ATTRIBUTEQUALIFIED controls the format of exported XML by controlling whether attributes. More...
 
 ELEMENTQUALIFIED = None
 ELEMENTQUALIFIED controls the format of exported XML. More...
 
 NAMESPACE = None
 NAMESPACE specifies the XML namespace to be used when projecting the. More...
 
 SUPPRESSTYPEPREFIX = None
 SUPPRESSTYPEPREFIX allows the type name that refers to this class. More...
 
 XMLDEFAULTREFERENCE = None
 XMLDEFAULTREFERENCE specifies the default value of the XMLREFERENCE property parameter. More...
 
 XMLENABLED = None
 If this parameter is true then XML-enabling methods. More...
 
 XMLFORMAT = None
 The XMLFORMAT parameter controls the generation of the XMLExport and XMLImport. More...
 
 XMLIGNOREINVALIDATTRIBUTE = None
 The XMLIGNOREINVALIDATTRIBUTE parameter allows the programmer to control handling of unexpected. More...
 
 XMLIGNOREINVALIDTAG = None
 The XMLIGNOREINVALIDTAG parameter allows the programmer to control handling of unexpected. More...
 
 XMLIGNORENULL = None
 XMLIGNORENULL allows the programmer to override the default XML handling. More...
 
 XMLINCLUDEINGROUP = None
 XMLINCLUDEINGROUP allows the programmer to control whether a class is included. More...
 
 XMLINHERITANCE = None
 If the XMLINHERITANCE parameter is set to "LEFT", then in the case of multiple. More...
 
 XMLNAME = None
 This parameter provides the default XMLNAME for the class. More...
 
 XMLNIL = None
 The XMLNIL class parameter controls the use of xsi:nil by XMLExport. More...
 
 XMLNILNOOBJECT = None
 The XMLNILNOOBJECT parameter allows creation of an object to be skipped for elements. More...
 
 XMLPREFIX = None
 The XMLPREFIX parameter controls the prefix to be used for the XML namespace that. More...
 
 XMLSEQUENCE = None
 If the XMLSEQUENCE = 1, then the order of the XML elements must match the. More...
 
 XMLSUMMARY = None
 The summary fields to be used when an object is referenced are specified. More...
 
 XMLTYPE = None
 This parameter provides the default XMLTYPE for the class. More...
 
 XMLUNSWIZZLE = None
 If the XMLUNSWIZZLE parameter is set to 1, then single object. More...
 
 XMLUSEEMPTYELEMENT = None
 If the XMLUSEEMPTYELEMENT parameter is set to 1, then the empty element shorthand (<tag>) More...
 

Private Member Functions

 DrawHTML ()
 Draw the contents of this component.
 
 DrawHeader ()
 Draw the header for the schedule.
 
 DrawMonthView (pInfo, _.Library.Date pStartDate, _.Library.Date pEndDate)
 Draw the month view for the schedule.
 
_.Library.Status GetScheduleInfo (_.Library.Date pStartDate, _.Library.Date pEndDate, _.Library.String pInfo)
 Get an array (pInfo) containing info used to show the schedule. More...
 

Static Private Member Functions

_.Library.Integer DaysInMonth (y, m)
 Return number of days in the given year and month.
 
_.Library.String FormatTime (_.Library.Integer pTime)
 Take a time value (number of minutes from midnight) and return. More...
 
_.Library.Date GetMonthRange (_.Library.Date pDate, pEndDate, _.Library.Integer pStartOfWeek)
 Given a date (as a $H value), return the. More...
 
_.Library.Date GetStartOfWeek (_.Library.Date pDate, _.Library.Integer pStartOfWeek)
 Given a date (as a $H value), return the. More...
 
_.Library.Boolean IsLeapYear (y)
 Return whether the given year is a leap year.
 

Additional Inherited Members

- Static Public Member Functions inherited from Adaptor
_.Library.Status XMLDTD (_.Library.String top, _.Library.String format, _.Library.Boolean input, dtdlist)
 Write the DTD to the current device for this XML enabled class serialized as. More...
 
_.Library.RegisteredObject XMLNew (_.XML.Document document, _.Library.Integer node, _.Library.RegisteredObject containerOref)
 Get an instance of an XML enabled class. More...
 
_.Library.Status XMLSchema (_.Library.String top, _.Library.String format, _.Library.String namespacePrefix, _.Library.Boolean input, _.Library.Boolean refOnly, schema)
 Write an XML Schema fragment to the current device which describes an XML enabled class and dependent classes. More...
 
_.Library.String XMLSchemaNamespace ()
 Get the namespace to which this class belongs for use in schema generation. More...
 
_.Library.Status XMLSchemaType (_.XML.Schema schemaInstance, _.XML.Node node, _.Library.String top, _.Library.Boolean encoded, _.Library.Boolean summary, _.Library.Boolean input, _.Library.Boolean refOnly)
 Add a complexType to the schema that is respresented by an <class>XML.Schema</class> instance. More...
 

Detailed Description

Displays a daily schedule for a given time period as an HTML component.

The schedule displays time slots for one or more days. User-defined scheduled items are placed on top of the appropriate time slots.

Controlling the Display of the Schedule

The <property>view</property> property controls what timespan is displayed: day, week, or month.
The <property>date</property> controls what time period is displayed. If a weekly <property>view</property> is used, then the week containing <property>date</property> is displayed.
The <property>interval</property> property specifies the size of each time slot in minutes.
while the <property>cellHeight</property> property specifies how tall each slot will be (in pixels).
The number of intervals displayed for each day is determined by the <property>startTime</property> and <property>endTime</property> properties; these provide the default starting and ending times for each day (in minutes from midnight). If there are scheduled items outside this range, additional slots are added to make the items visible.
When the user clicks on a cell, the <property>onselectitem</property> event handler is invoked. This handler is passed 2 variables: id-the user defined id value for a scheduled item as provided by the <property>OnGetScheduleInfo</property> callback (or null for an empty cell); and time-the time value associated with the cell (in yyyy-mm-dd hh:mm:ss format).

Providing Data for the Schedule

The scheduled items are provided by the user-defined server-side callback method <property>OnGetScheduleInfo</property>. This callback is passed an array of parameter values (from the <property>parameters</property> collection; the starting day value (as $H format) and the ending day value (also as $H format). It returns an array containing a list of items to display.
The array of scheduled items takes the form:

    pInfo(day,time,n) = $LB(duration,id,text,type,style)
    

Where day is the day ($H) for the item; time is the start time (in minutes from midnight) for the item; n is a arbitrary number (typically 1) used just in case there are two or more items with the same day and time value. The data for each element contains duration, length of the item in minutes; id, a logical id value associated with this item (and passed on to the <property>onselectitem</property> event handler; text, text to display within the item; type, indicates the type of item: 0 is "unavailable" time slot and 1 is a scheduled time slot; style is option css style to apply to the time slot.
You can also provide day-wide styles by using the top-nodes of the array:

    pInfo(day) = "css style for this day"
    



For example:

ClassMethod GetScheduleInfo(ByRef pParms As String,pStartDate As Date,pEndDate As Date,ByRef pInfo As List) As Boolean { // Display a 1 hour staff meeting for the first // day of this period. Set pInfo(pStartDate,9*60,1) = $LB(60,1,"Staff Meeting",1,"background: green;") Quit 1 }

Member Function Documentation

◆ FormatTime()

_.Library.String FormatTime ( _.Library.Integer  pTime)
staticprivate

Take a time value (number of minutes from midnight) and return.

a formatted display value.

◆ GetMonthRange()

_.Library.Date GetMonthRange ( _.Library.Date  pDate,
  pEndDate,
_.Library.Integer  pStartOfWeek 
)
staticprivate

Given a date (as a $H value), return the.

date (as a $H value) of the first and last dates to display for the month the date is in.

◆ GetScheduleInfo()

_.Library.Status GetScheduleInfo ( _.Library.Date  pStartDate,
_.Library.Date  pEndDate,
_.Library.String  pInfo 
)
private

Get an array (pInfo) containing info used to show the schedule.


This array is subscripted by item number.

◆ GetStartOfWeek()

_.Library.Date GetStartOfWeek ( _.Library.Date  pDate,
_.Library.Integer  pStartOfWeek 
)
staticprivate

Given a date (as a $H value), return the.

date (as a $H value) of the start of the week the date is in.
pStartOfWeek indicates which is the starting day of the week (Sunday=0, Saturday = 6).

◆ getDropTimeSlot()

getDropTimeSlot ( )

Return information about the most recent.

data drop. This is intended to be called from a ondrop handler.
It returns the time slot where the data was dropped in yyyy-mm-dd hh:mm:ss format or '' if data was not dropped on a valid slot.

◆ mouseClickHandler()

mouseClickHandler (   evt,
  type,
  time,
  cellId,
  userId,
  duration 
)

Mouse click handler

type can be: -1 for unassigned slot, 0 for unavailable, 1 for booked item.
cellId is HTML id of the item
itemId is the user provided id of the item.

◆ onRefreshContents()

onRefreshContents ( )

This client callback is called just from refreshContents.

just after the new HTML is delivered from the server.

Reimplemented from component.

Member Data Documentation

◆ OnGetScheduleInfo

OnGetScheduleInfo

Name of Server-side callback method to call to get information.

used to display the schedule.
This must be the name of a server-only method in the page class that contains this component.  

◆ caption

caption

If provided, this text is displayed as a caption.

along the top of the schedule. The text is not HTML escaped, so that it can contain markup.  

◆ cellHeight

cellHeight

Height of time slot cell.

 

◆ date

date

Date to display (in YYYY-MM-DD format).


If not specified, the current day is used.
The schedule will display a range of days that contain this date value. The range of values depends on the current value of the <property>view</property> property.  

◆ dateFormat

dateFormat

Date format used for sub-caption.

Refer to the

$ZDT function for details.  

◆ dayList

dayList

List of localized day names.

 

◆ endTime

endTime

Ending time (in minutes from midnight) to show for the daily.

calendar.  

◆ firstDayOfWeek

firstDayOfWeek

Specified which day of the week (Sunday=0, Saturday = 6) is displayed as.

the starting day of the week.
This allows for customizing for locales in which weeks start with other days of the week.  

◆ headerHeight

headerHeight

Height of header cells.

 

◆ interval

interval

Specifies the size (duration) of the calendar slots (in minutes).

 

◆ monthList

monthList

List of localized month names.

 

◆ onchangeview

onchangeview

onchangeview event handler:

If defined, this event is fired when the user changes the view mode of the schedule (such as from month to day view).  

◆ onselectitem

onselectitem

onselectitem event handler:

If defined, this event is fired when the user clicks on an item within the schedule.  

◆ parameters

parameters

User-defined set of parameters.

These are passed

along to the <property>OnGetScheduleInfo</property> callback method.  

◆ selectedInterval

selectedInterval

Length (in minutes) of the current selected cell(s).

 

◆ selectedTime

selectedTime

Start time of the current selected cell(s).

 

◆ shortDayList

shortDayList

List of localized short day names.

 

◆ shortMonthList

shortMonthList

List of localized short month names.

 

◆ startTime

startTime

Starting time (in minutes from midnight) to show for the daily.

calendar.  

◆ view

view

Specifies what type of schedule to display.