v7.3.0
SupportExamplesFree Trial

TaskEditorBase
Abstract

Abstract base class for the SchedulerTaskEditor and GanttTaskEditor. It provides the common infrastructure for loading a task record into a tabbed popup editor, handling save/cancel/delete actions, and managing field editability based on the scheduling engine's constraints. Subclasses define the specific tab layout and fields appropriate for their product.

§ * ## See also

  • TaskEdit — Feature that manages opening and closing the task editor
  • GeneralTab — Default general properties tab
  • AdvancedTab — Default advanced properties tab
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • A task field (id, wbsCode, sequenceNumber, etc.) that will be used when displaying and editing linked tasks. Defaults to Gantt dependencyIdField

  • The decimal precision to use for Duration field / columns, normally provided by the owning Scheduler´s durationDisplayPrecision

  • Set true to add a border to this container's element.

  • The CSS class(es) to add when HTML content is being applied to this widget.

  • An optional CSS class to add to child items of this container.

  • Custom style spec to add to element

    Has a corresponding runtime style property.

  • Update fields if the record changes

  • Can be set to true to make a focus of a focusable encapsulating element relay focus down into a focusable child. This is normally false to allow mousedown to begin text selection in Popups.

  • Number of columns to use in a grid layout. Applied as grid-template-columns: repeat(n, auto). Also applies the b-columns CSS class to the container.

    Has a corresponding runtime gridColumns property.

  • isolateFields : Booleanfalse
    internal
    Popup

    Specify true to isolate record changes to this container and its ancestors. Prevents record updates from propagating up from here and also prevents record updates from parent from propagating down to us.

  • A config object containing default settings to apply to all child widgets.

  • The tools to add either before or after the title in the Panel header. Each property name is the reference by which an instantiated tool may be retrieved from the live tools property.

    Has a corresponding runtime tools property.

  • Element (or the id of an element) to append this widget's element to. Can be configured, or set once at runtime. To access the element of a rendered widget, see element.

    Has a corresponding runtime appendTo property.

  • content : String
    ADVANCED
    Popup

    The HTML content that coexists with sibling elements which may have been added to the contentElement by plugins and features. When specifying html, this widget's element will also have the htmlCls class added to its classList, to allow targeted styling.

    Has a corresponding runtime content property.

  • Object to apply to elements dataset (each key will be used as a data-attribute on the element)

    Has a corresponding runtime dataset property.

  • A createElement config object or HTML string from which to create the Widget's element.

    Has a corresponding runtime element property.

  • Widget id, if not specified one will be generated. Also used for lookups through Widget.getById

    Has a corresponding runtime id property.

  • Element (or element id) to insert this widget before. If provided, appendTo config is ignored.

    Has a corresponding runtime insertBefore property.

  • Element (or element id) to append this widget element to, as a first child. If provided, appendTo config is ignored.

    Has a corresponding runtime insertFirst property.

  • tag : Stringdiv
    ADVANCED
    Popup

    The tag name of this Widget's root element

  • Internal listeners, that cannot be removed by the user.

  • Only valid if this Widget is floating and being shown through showBy.true to show a connector arrow pointing to the align target.

  • Only valid if this Widget is floating. Set to true to centre the Widget in browser viewport space.

  • Only valid if this Widget is floating or positioned. Element, Widget or Rectangle to which this Widget is constrained.

  • Set to false to prevent dragging the popup element.

    • handleSelector : String

      CSS selector used to determine if a drag operation can be started from a mouse-downed element inside the popup

  • Set to true to move the widget out of the document flow and position it absolutely in browser viewport space.

  • Set to true to make this widget take all available space in the visible viewport.

    Has a corresponding runtime maximized property.

  • scrollAction : 'hide'/'realign'/null
    Popup

    Defines what to do if document is scrolled while Widget is visible (only relevant when floating is set to true). Valid values: ´null´: do nothing, ´hide´: hide the widget or ´realign´: realign to the target if possible.

  • When this widget is a child of a Container, it will by default be participating in a flexbox layout. This config allows you to set this widget's align-self style.

    Has a corresponding runtime alignSelf property.

  • Controls whether the panel is collapsed (the body of the panel is hidden while only the header is visible). Only valid if the panel is collapsible.

    Has a corresponding runtime collapsed property.

  • When this widget is a child of a Container, it will by default be participating in a flexbox layout. This config allows you to set this widget's flex style. This may be configured as a single number or a <flex-grow> <flex-shrink> <flex-basis> format string. numeric-only values are interpreted as the flex-grow value.

    Has a corresponding runtime flex property.

  • Widget's height, used to set element style.height. Either specify a valid height string or a number, which will get 'px' appended. We recommend using CSS as the primary way to control height, but in some cases this config is convenient.

    Has a corresponding runtime height property.

  • Configure with true to make widget initially hidden.

    Has a corresponding runtime hidden property.

  • Widget's margin. This may be configured as a single number or a TRBL format string. numeric-only values are interpreted as pixels.

    Has a corresponding runtime margin property.

  • The element's maxHeight. Can be either a String or a Number (which will have 'px' appended). Note that like height, reading the value will return the numeric value in pixels.

    Has a corresponding runtime maxHeight property.

  • The elements maxWidth. Can be either a String or a Number (which will have 'px' appended). Note that like width, reading the value will return the numeric value in pixels.

    Has a corresponding runtime maxWidth property.

  • The element's minHeight. Can be either a String or a Number (which will have 'px' appended). Note that like height, reading the value will return the numeric value in pixels.

    Has a corresponding runtime minHeight property.

  • The elements minWidth. Can be either a String or a Number (which will have 'px' appended). Note that like width, reading the value will return the numeric value in pixels.

    Has a corresponding runtime minWidth property.

  • A widgets weight determines its position among siblings when added to a Container. Higher weights go further down.

  • Widget's width, used to set element style.width. Either specify a valid width string or a number, which will get 'px' appended. We recommend using CSS as the primary way to control width, but in some cases this config is convenient.

    Has a corresponding runtime width property.

  • When this Widget configuration is used in the Grid's RowExpander feature's widget config, provide the field on the expanded record to use for populating this widget's store (if applicable)

  • Event that should be considered the default action of the widget. When that event is triggered the widget is also expected to trigger an action event. Purpose is to allow reacting to most widgets in a coherent way.

  • The name of the property to set when a single value is to be applied to this Widget. Such as when used in a grid WidgetColumn, this is the property to which the column's field is applied.

  • An icon to show before the title. Either pass a CSS class as a string, or pass a DomConfig object describing an element to represent the icon.

  • Set to false to disable localization of this object.

  • This config object contains the defaults for the Mask created for the masked config. Any properties specified in the masked config will override these values.

  • Set to true to apply the default mask to the widget. Alternatively, this can be the mask message or a Mask config object.

  • Prevent tooltip from being displayed on touch devices. Useful for example for buttons that display a menu on click etc, since the tooltip would be displayed at the same time.

  • If you are rendering this widget to a shadow root inside a web component, set this config to the shadowRoot. If not inside a web component, set it to document.body

  • Set to false to not show the tooltip when this widget is disabled

  • This config is used with PanelCollapserOverlay to programmatically control the visibility of the panel's body. In this mode of collapse, the body of a collapsed panel is a floating overlay. Setting this config to true will show this element, while false will hide it.

  • Auto show flag for Popup. If truthy then Popup is shown automatically upon hover.

  • Show a tool in the header to close this Popup. The tool is available in the tools object under the name close. It uses the CSS class b-popup-close to apply a default close icon. This may be customized with your own CSS rules.

  • Close popup when Escape key is pressed.

  • By default a Popup is focused when it is shown. Configure this as false to prevent automatic focus on show.

  • DOM element to attach popup.

  • Show a tool in the header to maximize this popup

  • Show popup when user clicks the element that it is anchored to. Cannot be combined with showOnHover. Can also be provided as the button number (0: main button, 2: right button).

  • By default, tabbing within a Popup is circular - that is it does not exit. Configure this as false to allow tabbing out of the Popup.

  • Update assigned record automatically on field changes

  • Specify true to match fields by their name property only when assigning a record, without falling back to ref.

    Has a corresponding runtime strictRecordMapping property.

  • The class to instantiate to use as the scrollable. Defaults to Scroller.

  • The bottom CSS absolute position for this widget. If specified, the widget is implicitly configured as positionable.

  • Programmatic control over which column to start in when used in a grid layout.

    Has a corresponding runtime column property.

  • left : Number/String
    internal
    Popup

    The inset-inline-start CSS absolute position for this widget. If specified, the widget is implicitly configured as positionable.

  • Set this config to false to disable batching DOM updates on animation frames for this widget. This has the effect of synchronously updating the DOM when configs affecting the rendered DOM are modified. Depending on the situation, this could simplify code while increasing time spent updating the DOM.

  • The inset-inline-end CSS absolute position for this widget. If specified, the widget is implicitly configured as positionable.

  • Programmatic control over how many columns to span when used in a grid layout.

    Has a corresponding runtime span property.

  • top : Number/String
    internal
    Popup

    The top CSS absolute position for this widget. If specified, the widget is implicitly configured as positionable.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isDelayable : Booleantrue
    READONLY
    static
    ADVANCED
    Delayable
    Identifies an object as an instance of Delayable class, or subclass thereof.
  • isEvents : Booleantrue
    READONLY
    static
    ADVANCED
    Events
    Identifies an object as an instance of Events class, or subclass thereof.
  • isKeyMap : Booleantrue
    READONLY
    static
    ADVANCED
    KeyMap
    Identifies an object as an instance of KeyMap class, or subclass thereof.
  • isLocalizable : Booleantrue
    READONLY
    static
    ADVANCED
    Localizable
    Identifies an object as an instance of Localizable class, or subclass thereof.
  • isRTL : Booleantrue
    READONLY
    static
    ADVANCED
    RTL
    Identifies an object as an instance of RTL class, or subclass thereof.
  • isResizable : Booleantrue
    READONLY
    static
    ADVANCED
    Resizable
    Identifies an object as an instance of Resizable class, or subclass thereof.
  • isState : Booleantrue
    READONLY
    static
    ADVANCED
    State
    Identifies an object as an instance of State class, or subclass thereof.
  • isTaskEditorBase : Booleantrue
    READONLY
    static
    ADVANCED
    Identifies an object as an instance of TaskEditorBase class, or subclass thereof.
  • isToolable : Booleantrue
    READONLY
    static
    ADVANCED
    Toolable
    Identifies an object as an instance of Toolable class, or subclass thereof.
  • properties : Object
    internal
    static
    Popup

    A class property getter for the default values of internal properties for this class.

  • all : Widget[]
    internal
    READONLY
    static
    Popup

    Returns an array containing all existing Widgets. The returned array is generated by this call and is not an internal structure.

  • focusVisible : Boolean
    internal
    READONLY
    static
    Popup

    This property yields true if the currently focused element has been reached through other means than mouse click. If the activeElement matches :focus-visible.

  • recomposeAsync : Boolean
    internal
    static
    Popup

    Get/set the recomposeAsync config for all widgets. Setting this value will set the config for all existing widgets and will be the default value for newly created widgets. Set this value to null to disable the default setting for new widgets while leaving existing widgets unaffected.

    Has a corresponding recomposeAsync config.

  • tooltip : Tooltip
    READONLY
    static
    Popup

    The shared Tooltip instance which handles tooltips which are not configured with newInstance : true.

    Has a corresponding tooltip config.

  • emptyArray : Array
    internal
    READONLY
    Popup

    An empty array that can be used as a default value.

  • emptyObject : Object
    internal
    READONLY
    Popup

    An empty object that can be used as a default value.

  • isContainer : Booleantrue
    READONLY
    ADVANCED
    Popup
    Identifies an object as an instance of Container class, or subclass thereof.
  • isPanel : Booleantrue
    READONLY
    ADVANCED
    Popup
    Identifies an object as an instance of Panel class, or subclass thereof.
  • isPopup : Booleantrue
    READONLY
    ADVANCED
    Popup
    Identifies an object as an instance of Popup class, or subclass thereof.
  • isTaskEditorBase : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of TaskEditorBase class, or subclass thereof.
  • isWidget : Booleantrue
    READONLY
    ADVANCED
    Popup
    Identifies an object as an instance of Widget class, or subclass thereof.
  • Returns the first widget in this Container.

  • Number of columns to use in a grid layout. Applied as grid-template-columns: repeat(n, auto). Also applies the b-columns CSS class to the container.

    Has a corresponding gridColumns config.

  • initialItems : Boolean
    internal
    READONLY
    Popup

    This property is true until the container's initial items config has been processed. This property is set to false by the updateItems method.

  • Returns true if currently setting values. Allow fields to change highlighting to distinguishing between initially setting values and later on changing values.

  • isValid : Boolean
    READONLY
    Popup

    Returns true if all contained fields are valid, otherwise false

  • lastItem : Widget
    READONLY
    Popup

    Returns the last widget in this Container.

  • bbar : Toolbar
    READONLY
    Popup

    Get toolbar Toolbar docked to the bottom of the panel

    Has a corresponding bbar config.

  • tbar : Toolbar
    READONLY
    Popup

    Get toolbar Toolbar docked to the top of the panel

    Has a corresponding tbar config.

  • The tools as specified by the tools configuration. Each is a Tool instance which may be hidden, shown and observed and styled just like any other widget.

    Has a corresponding tools config.

  • Element (or the id of an element) to append this widget's element to. Can be configured, or set once at runtime. To access the element of a rendered widget, see element.

    Has a corresponding appendTo config.

  • content : String
    ADVANCED
    Popup

    Set HTML content safely, without disturbing sibling elements which may have been added to the contentElement by plugins and features. When specifying html, this widget's element will also have the htmlCls added to its classList, to allow targeted styling.

    Has a corresponding content config.

  • contentElement : HTMLElement
    READONLY
    ADVANCED
    Popup

    The child element into which content should be placed. This means where html should be put, or, for Containers, where child items should be rendered.

  • Get widgets elements dataset or assign to it

    Has a corresponding dataset config.

  • Get this widget's encapsulating HTMLElement, which is created along with the widget but added to DOM at render time.

    Has a corresponding element config.

  • focusElement : HTMLElement
    READONLY
    ADVANCED
    Popup

    Get this widget's primary focus holding element if this widget is itself focusable, or contains focusable widgets.

  • focusability : Focusability
    internal
    READONLY
    Popup

    Returns an object describing the focus and keyboard navigation aspects of this widget's focusElement.

  • focusableElement : HTMLElement
    READONLY
    ADVANCED
    Popup

    Returns this widget's focusElement if that element can currently be given focus (e.g., this widget is not disabled, or hidden).

  • hasPainted : Boolean
    internal
    READONLY
    Popup

    This property is set to true after processing the initial paint for the widget. It remains false during the initial paint. The intended use for this flag is to avoid processing that will be handled by the first paint (similar to not firing events during the widget's initial configuration). If this field is true, the initial paint has already taken place, otherwise, it has yet to run. This field differs from isPainted which checks that the widget's element is attached to the DOM.

  • Get/set widgets id

    Has a corresponding id config.

  • Element (or element id) to insert this widget before. If provided, appendTo config is ignored.

    Has a corresponding insertBefore config.

  • Element (or element id) to append this widget element to, as a first child. If provided, appendTo config is ignored.

    Has a corresponding insertFirst config.

  • overflowElement : HTMLElement
    READONLY
    ADVANCED
    Popup

    The child element which scrolls if any. This means the element used by the scrollable.

  • staticClassList : DomClassList
    internal
    READONLY
    Popup

    Returns the DomClassList for this widget's class. This object should not be mutated.

  • Get/set widgets elements style. The setter accepts a cssText string or a style config object, the getter always returns a CSSStyleDeclaration

    Has a corresponding style config.

  • Set to true to make this widget take all available space in the visible viewport.

    Has a corresponding maximized config.

  • keyMapElement : HTMLElement
    private
    READONLY
    KeyMap

    Override to attach the keyMap keydown event listener to something else than this.element

  • keyMapSubComponents : Object
    private
    READONLY
    KeyMap

    Override to make keyMap resolve subcomponent actions to something else than this.features.

  • Get/set this widget's align-self flexbox setting. This may be set to modify how this widget is aligned within the cross axis of a flexbox layout container.

    Has a corresponding alignSelf config.

  • Controls whether the panel is collapsed (the body of the panel is hidden while only the header is visible). Only valid if the panel is collapsible.

    Has a corresponding collapsed config.

  • This property is true if the panel is currently collapsing.

  • collapsingExpanding : Boolean
    internal
    READONLY
    Popup

    This property is true if the panel is currently either collapsing or expanding.

  • This property is true if the panel is currently expanding.

  • Get element's offsetHeight or sets its style.height, or specified height if element no created yet.

    Has a corresponding height config.

  • Get element's margin property. This may be configured as a single number or a TRBL format string. numeric-only values are interpreted as pixels.

    Has a corresponding margin config.

  • Get/set element's maxHeight. Getter returns max-height from elements style, which is always a string. Setter accepts either a String or a Number (which will have 'px' appended). Note that like height, reading the value will return the numeric value in pixels.

    Has a corresponding maxHeight config.

  • Get/set elements maxWidth. Getter returns max-width from elements style, which is always a string. Setter accepts either a String or a Number (which will have 'px' appended). Note that like width, reading the value will return the numeric value in pixels.

    Has a corresponding maxWidth config.

  • Get/set element's minHeight. Getter returns min-height from elements style, which is always a string. Setter accepts either a String or a Number (which will have 'px' appended). Note that like height, reading the value will return the numeric value in pixels.

    Has a corresponding minHeight config.

  • Get/set elements minWidth. Getter returns min-width from elements style, which is always a string. Setter accepts either a String or a Number (which will have 'px' appended). Note that like width, reading the value will return the numeric value in pixels.

    Has a corresponding minWidth config.

  • Accessor to the Scroller which can be used to both set and read scroll information.

    Has a corresponding scrollable config.

  • Get elements offsetWidth or sets its style.width, or specified width if element not created yet.

    Has a corresponding width config.

  • config : Object
    READONLY
    ADVANCED
    Popup

    Returns a copy of the full configuration which was used to configure this object.

  • isConstructing : Boolean
    READONLY
    ADVANCED
    Popup

    This property is set to true before the constructor returns.

  • isDestroying : Boolean
    READONLY
    ADVANCED
    Popup

    This property is set to true on entry to the destroy method. It remains on the objects after returning from destroy(). If isDestroyed is true, this property will also be true, so there is no need to test for both (for example, comp.isDestroying || comp.isDestroyed).

  • assignedId : String
    private
    READONLY
    Popup

    Get id assigned by user (not generated id)

  • Get/set element's disabled state. Set to 'inert' to also set the inert DOM attribute.

    Has a corresponding disabled config.

  • true if no id was set, will use generated id instead (widget1, ...). Toggle automatically on creation

  • This readonly property is true for normal widgets in the items of a container. It is false for special widgets such as a tbar.

  • Get the global LocaleHelper

  • Get the global LocaleManager

  • tab : Tab
    READONLY
    Popup

    The tab created for this widget when it is placed in a TabPanel.

    Has a corresponding tab config.

  • modalMask : HTMLElement
    internal
    READONLY
    Popup

    Returns the modal mask element for this Popup correctly positioned just below this Popup.

  • Specify true to match fields by their name property only when assigning a record, without falling back to ref.

    Has a corresponding strictRecordMapping config.

  • isStateful : Boolean
    READONLY
    ADVANCED
    State

    Returns true if this instance implements the State interface.

  • isStatefulActive : Boolean
    internal
    READONLY
    State

    Returns true if this instance is ready to participate in state activities.

  • Gets or sets a component's state

  • Returns the state key to use for this instance. This will be either the stateId or the id (if explicitly specified and stateful is not false).

  • statefulness : Object
    private
    READONLY
    State

    Returns an object whose truthy keys are the config properties to include in this object's state.

  • Determines visibility by checking if the Widget is hidden, or any ancestor is hidden and that it has an element which is visible in the DOM

  • Programmatic control over which column to start in when used in a grid layout.

    Has a corresponding column config.

  • isComposable : Boolean
    internal
    READONLY
    Popup

    Returns true if this class uses compose() to render itself.

  • overflowTwin : Widget
    internal
    READONLY
    Popup

    This widget's twin that is placed in an overflow menu when this widget has been hidden by its owner, typically a Toolbar due to overflow. The overflowTwin is created lazily by ensureOverflowTwin.

  • Programmatic control over how many columns to span when used in a grid layout.

    Has a corresponding span config.

  • Get this Widget's next sibling in the parent Container, or, if not in a Container, the next sibling widget in the same parentElement.

  • Get this Widget's parent when used as a child in a Container,

  • Get this Widget's previous sibling in the parent Container, or, if not in a Container, the previous sibling widget in the same parentElement.

  • The number of visible child items shown in this Container.

  • widgetMap : Object<String, Widget>
    READONLY
    Popup

    An object which contains a map of descendant widgets keyed by their ref. All descendant widgets will be available in the widgetMap.

Functions

Functions are methods available for calling on the class
  • onClassMixedIn( )
    internal
    static
    Popup

    This optional class method is called when a class is mixed in using the mixin() method.

  • emptyCache( )
    internal
    Popup

    Clear caches, forces all calls to fromCache to requery dom. Called on render/rerender.

  • Internal function used to hook destroy() calls when using thisObj

  • Internal function used restore hooked destroy() calls when using thisObj

  • doDestroy( )
    internal
    Events

    Auto detaches listeners registered from start, if set as detachable

  • once( )
    private
    Events

    Internal function used to run a callback function after an event is triggered

  • Removes all listeners registered to this object by the application.

  • Only valid for floating Widgets. Moves to the front of the visual stacking order.

  • Called on keyMapElement keyDown

  • finalizeInit( )
    internal
    Popup

    Called by the Base constructor after all configs have been applied.

  • Collapse the panel.

  • Expand the panel.

  • close( )
    ASYNC
    Popup

    Performs the configured closeAction upon this popup. By default, the popup hides. The closeAction may be configured as 'destroy'.


    Triggers: beforeClose

  • afterRecompose( )
    internal
    Popup

    This method is called following an update to the widget's rendered DOM.

  • Disable the widget

  • Enable the widget

  • Unmask the widget

Events

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

    This event is fired after a widget's elements have been synchronized due to a direct or indirect call to recompose, if this results in some change to the widget's rendered DOM elements.

Event handlers

Event handlers are callbacks called as a result of certain actions in this class
  • This event is called after a widget's elements have been synchronized due to a direct or indirect call to recompose, if this results in some change to the widget's rendered DOM elements.

CSS variables

CSS variables that can be set to adjust appearance
Name Description
--b-task-editor-bottom-button-width Task editor bottom button width, looks neater if all buttons have the same width
--b-task-editor-occurrence-info-background Task editor occurrence info background color, a shade of its primary color
--b-task-editor-occurrence-info-primary Task editor occurrence info primary color
--b-task-editor-padding Task editor padding

Source path

SchedulerPro/widget/TaskEditorBase.js

Contents