Class: SystemTagsInputField

OC.SystemTags.SystemTagsInputField()

Displays a file's system tags

Constructor

new SystemTagsInputField()

Source:

Methods

_createSearchChoice(term) → {Object}

Create new dummy choice for select2 when the user types an arbitrary string
Parameters:
Name Type Description
term string entered term
Source:
Returns:
dummy tag
Type
Object

_formatDropDownResult(data) → {string}

Formats a single dropdown result
Parameters:
Name Type Description
data Object data to format
Source:
Returns:
HTML markup
Type
string

_formatSelection(data) → {string}

Formats a single selection item
Parameters:
Name Type Description
data Object data to format
Source:
Returns:
HTML markup
Type
string

_onClickDeleteTag(ev)

Event handler whenever a tag must be deleted
Parameters:
Name Type Description
ev Object event
Source:

_onClickRenameTag()

Event handler whenever the user clicked the "rename" action. This will display the rename field.
Source:

_onDeselectTag(e)

Event handler whenever a tag gets deselected.
Parameters:
Name Type Description
e Object event
Source:

_onSelectTag(e)

Event handler whenever a tag is selected. Also called whenever tag creation is requested through the dummy tag object.
Parameters:
Name Type Description
e Object event
Source:

_onSubmitRenameTag(ev)

Event handler whenever the rename form has been submitted after the user entered a new tag name. This will submit the change to the server.
Parameters:
Name Type Description
ev Object event
Source:

_queryTagsAutocomplete(query)

Autocomplete function for dropdown results
Parameters:
Name Type Description
query Object select2 query object
Source:

_refreshSelection()

Refreshes the selection, triggering a call to select2's initSelection
Source:

initialize(optionsopt)

Creates a new SystemTagsInputField
Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Default Description
objectType string <optional>
files object type for which tags are assigned to
multiple bool <optional>
false whether to allow selecting multiple tags
allowActions bool <optional>
true whether tags can be renamed/delete within the dropdown
allowCreate bool <optional>
true whether new tags can be created
isAdmin bool <optional>
true whether the user is an administrator
initSelection function function to convert selection to data
Source:

render()

Renders this details view
Source: