v7.3.0

ResourceView
Widget

A Calendar view which encapsulates a series of child Calendar views, one for each resource (often referred to as "calendar") in the project.

This view is a Panel which contains calendar views such as WeekView as child views. To configure the child views, use the view config.

The type of view displayed defaults to 'week', but this can be changed using the type property in the view config object.

Usage :

new Calendar({
    appendTo : domElement,

// Resource avatar images are loaded from this path resourceImagePath : '../_shared/images/users/',

modes : { // Let's not show the default views day : null, week : null, month : null, year : null, agenda : null,

// Mode name can be anything if it contains a "type" property. monthResourceview : { // Type has the final say over which view type is created type : 'resource',

// This is a config object for the subviews; one for each resource view : { // We show a month view for each resource in the project type : 'month' } } } });

Useful configs

Config Description
view Config for child views (type, range, etc.)
resourceWidth Width of each resource panel
showAvatars Show resource avatar images in headers
meta Field or function for subheader text
hideEmptyResources Hide resource panels with no events

See also

  • Calendar — The main Calendar that hosts this view
  • DayResourceView — Alternative resource layout grouping resources by date
  • WeekView — The default child view type used per resource
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • Configure this as true to hide child views which have no events.

    Has a corresponding runtime hideEmptyResources property.

  • Set to true to hide non-working days

    Has a corresponding runtime hideNonWorkingDays property.

  • If the displayed view is a DateRangeOwner, this may be used to set the range of all child views.

    Has a corresponding runtime range property.

  • The width of a resource calendar panel (view always stretches to fill window)

    Has a corresponding runtime resourceWidth property.

  • The space to leave between each subview.

    Has a corresponding runtime viewGap property.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • dayViewScroller : Object
    private
    READONLY

    This creates a specially styled DayView which matches the view config (so that dayStartTime, hourHeight etc. is synced) which shows nothing but its scrollbar. This acts as the single visible scrollbar on the right of the ResourceView. We cannot have the last DayViewoverflowY : true because then its flexed width being equal to the others, its content area would be scrollBarWidth narrower than the others.

  • dayViewTimeAxis : Number
    private
    READONLY

    This creates a specially styled DayView which matches the view config (so that dayStartTime, hourHeight etc. is synced) which shows nothing but its time axis. This acts as the single visible time axis on the left.

  • Returns the value of the child view's fixedDuration property.

  • Configure this as true to hide child views which have no events.

    Has a corresponding hideEmptyResources config.

  • Set to true to hide non-working days

    Has a corresponding hideNonWorkingDays config.

  • If the displayed view is a DateRangeOwner, this may be used to set the range of all child views.

    Has a corresponding range config.

  • The width of a resource calendar panel (view always stretches to fill window)

    Has a corresponding resourceWidth config.

  • The space to leave between each subview.

    Has a corresponding viewGap config.

  • Yields the views which this ResourceView owns.

  • isResourceView : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of ResourceView class, or subclass thereof.

Functions

Functions are methods available for calling on the class

    Events

    Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

    Event handlers

    Event handlers are callbacks called as a result of certain actions in this class

    CSS variables

    CSS variables that can be set to adjust appearance
    Name Description
    --b-resource-view-header-height Resource header height
    type: resourceview

    Source path

    Calendar/widget/ResourceView.js

    Demo

    examples/resourceview

    Contents