Class

ItemListManager

ItemListManager(contentDiv, onClickHandler, onEditHandler, onDeleteHandler, selectable, editable, cssClass, renameHintI18n, deleteHintI18n, virtualItems)

The ItemListManager is a class that populates and manages a list of tag-related items. It is designed as an abstract class. The method getDbItems must be overwritten in child classes that inherit from this class.

Constructor

# new ItemListManager(contentDiv, onClickHandler, onEditHandler, onDeleteHandler, selectable, editable, cssClass, renameHintI18n, deleteHintI18n, virtualItems)

Parameters:
Name Type Default Description
contentDiv Element

The element that is used as the container for the item list.

onClickHandler function

The handler that is called when an item is clicked.

onEditHandler function

The handler that is called when the edit button is pressed.

onDeleteHandler function

The handler that is called when the delete button is pressed.

selectable Boolean false

Whether or not items shall be selectable.

editable Boolean false

Whether or not items shall be editable.

cssClass string

The class that shall be put on the items in the list, so that they are easily stylable.

renameHintI18n string null

The i18next key for the rename tooltip/hint.

deleteHintI18n string null

The i18next key for the delete tooltip/hint.

virtualItems Array

A list of virtual items that shall be added on top of the list.

View Source frontend/components/tags/item_list_manager.js, line 25