Class: VersionTimelineGroupView

VersionTimelineGroupView()

A group of object versions for a specific date within the version history timeline.

Screenshot

Constructor

new VersionTimelineGroupView()

Since:
  • 2.37.0
Source:

Extends

  • Backbone.View

Members

className

Source:

tagName

Source:

type :string

Identifier used when the application inspects view types.
Type:
  • string
Source:

Methods

addTooltips()

Add tooltips to the ObjectVersionViews within this group. Should be called after the view is in the DOM to ensure tooltips are properly attached.
Source:

getDateKey() → {string}

Compute a stable key for the current date/label combination, used to determine when the group header needs to be re-rendered.
Source:
Returns:
Unique key representing the current date and label of this group.
Type
string

getVisibleDateNotes() → {number}

Count visible versions in this group that have a version date note (version date is later than the one that obsoletes it).
Source:
Returns:
Number of visible versions with a date note.
Type
number

initialize(optionsopt)

Parameters:
Name Type Attributes Description
options object <optional>
View options.
Properties
Name Type Attributes Description
model Backbone.Model <optional>
VersionTimeLineGroup model (defined in VersionTimelineGroups collection).
referencePid string <optional>
PID used for badge context.
Source:

listenToCollection()

Start listening for row-level UI-affecting changes
Source:

onClose()

Tears down nested views and clears the collection when the group is removed.
Source:

remove()

Source:

render() → {this}

Renders the timeline group shell and embeds an ObjectVersionsView.
Source:
Returns:
The view instance.
Type
this

setDateAndLabel(date, label)

Update the group header date/label and re-render this group.
Parameters:
Name Type Description
date Date | null Group date.
label string | null Group label.
Source:

setModels(models)

Replace the models backing this group while keeping the same collection reference.
Parameters:
Name Type Description
models Array.<object> Plain model attributes grouped for the date.
Source:

template(params) → {string}

Base markup for the timeline group.
Parameters:
Name Type Description
params Object Template parameters.
Properties
Name Type Description
date Date | null Group date at midnight.
label string | null Human-readable label for synthetic groups.
Source:
Returns:
HTML string for the timeline group shell.
Type
string

updateVisualState()

Show or hide the group depending on whether all versions are hidden, and add/remove the date note class based on whether any visible versions have a date note. Update the ObjectVersionsView to show/hide individual rows.
Source: