Class

TagOperationsManager

TagOperationsManager(tagsController)

The TagOperationsManager handles tag assignment, removal, selection state management, and other operations on tags.

Constructor

# new TagOperationsManager(tagsController)

Constructs a new TagOperationsManager

Parameters:
Name Type Description
tagsController Object

Reference to the tags controller

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 31

Methods

# async addTagsToGroup(tagGroupId, tagList)

Add tags to a group

Parameters:
Name Type Description
tagGroupId number

The tag group ID

tagList Array

The tag list

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 626

# async assignLastTag()

Assign the last used tag to the current selection

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 371

# async assignTagToVerses(id, cb_label, current_verse_selection, current_verse_reference_ids, checkboxTag)

Assign a tag to verses

Parameters:
Name Type Description
id number

The tag ID

cb_label string

The tag label

current_verse_selection string

The current verse selection as XML

current_verse_reference_ids Array

The current verse reference IDs

checkboxTag JQuery

The checkbox tag element

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 303

# async changeVerseListTagInfo(tag_id, tag_title, verse_selection, action)

Update the tag list in the existing verse lists when tags have been assigned/removed

Parameters:
Name Type Description
tag_id number

The tag ID

tag_title string

The tag title

verse_selection XMLDocument

The verse selection as an XML document

action string

The action ('assign' or 'remove')

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 532

# async clickCheckBoxTag(checkboxTag)

Handle a click on a checkbox tag

Parameters:
Name Type Description
checkboxTag JQuery

The checkbox tag element

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 191

# formatCheckboxElementBasedOnSelection(cb_element, selected_verse_tags)

Format a checkbox element based on the current verse selection

Parameters:
Name Type Description
cb_element HTMLElement

The checkbox element

selected_verse_tags Array

The tags associated with the current verse selection

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 103

# getCheckboxTag(id) → {JQuery}

Get a checkbox tag by ID

Parameters:
Name Type Description
id number

The tag ID

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 390

The checkbox tag element

JQuery

# async getTagList(forceRefresh) → {Array}

Get the tag list

Parameters:
Name Type Default Description
forceRefresh boolean true

Whether to force a refresh

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 558

The tag list

Array

# async handleCheckboxTagStateChange(checkboxTag)

Handle the state change of a checkbox tag

Parameters:
Name Type Description
checkboxTag JQuery

The checkbox tag element

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 236

# async handleTagCbClick(event)

Handle a click on a tag checkbox

Parameters:
Name Type Description
event Event

The click event

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 178

# async handleTagLabelClick(event)

Handle a click on a tag label

Parameters:
Name Type Description
event Event

The click event

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 168

# removeTagButtonNoHl(event)

Remove the no-highlight class from a tag button

Parameters:
Name Type Description
event Event

The mouseleave event

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 226

# async removeTagById(tagId)

Remove a tag by ID

Parameters:
Name Type Description
tagId number

The tag ID

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 510

# toggleTagButton(checkboxTag)

Toggle the tag button state

Parameters:
Name Type Description
checkboxTag JQuery

The checkbox tag element

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 205

# uncheckAllCheckboxElements()

Uncheck all checkbox elements when no verses are selected

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 142

# async updateAddTagToGroupTagList() → {number}

Update the tag list for adding tags to a group

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 606

The tag count

number

# updateTagInView(tagId, newTitle)

Update a tag in the view

Parameters:
Name Type Description
tagId number

The tag ID

newTitle string

The new tag title

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 406

# async updateTagList(currentBook, tagGroupId, contentId, forceRefresh)

Update the tag list

Parameters:
Name Type Default Description
currentBook string

The current book

tagGroupId number null

The tag group ID

contentId string null

The content ID

forceRefresh boolean false

Whether to force a refresh

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 571

# updateTagTitlesInVerseList(tag_id, is_global, title)

Update tag titles in the verse list

Parameters:
Name Type Description
tag_id number

The tag ID

is_global boolean

Whether the tag is global

title string

The tag title

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 423

# updateTagVerseCount(id, verseBoxes, to_increment)

Update the verse count for a tag

Parameters:
Name Type Description
id number

The tag ID

verseBoxes Array

The verse boxes

to_increment boolean

Whether to increment the count (true) or decrement it (false)

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 447

# async updateTagsViewAfterVerseSelection(force)

Update the tags view based on the current verse selection

Parameters:
Name Type Description
force boolean

Whether to force the update even if selection is blocked

View Source frontend/components/tool_panel/tag_assignment_panel/tag_operations_manager.js, line 65