Class for handling list of timeline elements.
All timeline elements - descendant for Item class.
All editors - descendants for Editor.
Timeline consists of four parts:
- all elements.
Elements from Scheduled section are not displayed in general list, they cannot be attached.
Elements from the Attached list are duplicates of elements from general list (i. e. single element has two instances, one in general list, second in attached list).
These elements will have the same identifier, but they are two different objects.
Elements in general section are grouped by days, with separator at the start of each day (it has separate methods to handle it).
The timeline itself only performs the rendering, it doesn't executes any queries. User actions call events, and handlers for these events execute their ajax queries.
|Method||Description||Available from version|
| ||Creates new element, when passing correct data.|
| ||Adds a new element into array of elements. When required, element is cloned into attached element list.
| ||Returns array of all elements.|
| ||Returns element by its ID.
| ||Returns array of all attached elements.|
| ||Returns attached element by its ID.
| ||Returns array of all elements from array Scheduled.|
| ||Returns element from Scheduled section by its ID.
| ||Renders timeline and returns DOM element.|
| ||Returns container with rendered timeline (when it was rendered).|
| ||Fully re-renders Scheduled section with new elements. Animation is used for deleting old and adding new elements.
| ||Returns string day presentation for the date |
| ||Returns existing separator, if available.
| ||Creates new separator, but won't be placed in DOM.
| ||Returns |
| ||Adds new element |
| ||Adds an element |
| ||Removes |
| ||Deletes |
| ||Shows loader and saves ajax query processing status.|
| ||Hides loader and resets ajax query processing status.|
| ||Returns object |
| ||Enables scroll event handling for element list. When scrolling to the end of the list, calls the event |
| ||Disables scrolling event handling for element list.|
|Throws event at the end of constructor execution. It can be used to get access to list object.
For example, you have elements with
To do that, register event handler:
To capture the rest of events, an available object is required. That's why the handler
|Event is thrown after timeline rendering.
Event handler can get container via the method
|Event is thrown when scrolling to bottom end of general element list.|
|Event is thrown when clicking on element pin symbol.