- Description:
The activity changer dialogue DOM manipulation module.
- Source:
- Copyright:
- 2025 Ferran Recio
- 2025 Ferran Recio
- License:
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
The activity changer dialogue DOM manipulation module.
Methods
cleanSearchResults()
- Description:
Clear the search results.
- Source:
focusFirstChooserOption(current)
- Description:
Move the focus to the first chooser option element.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
current |
HTMLElement | The current chooser option element |
focusLastChooserOption(current)
- Description:
Move the focus to the last chooser option element.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
current |
HTMLElement | The current chooser option element |
focusNextChooserOption(current)
- Description:
Move the focus to the previous chooser option element.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
current |
HTMLElement | The current chooser option element |
focusPreviousChooserOption(current)
- Description:
Move the focus to the previous chooser option element.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
current |
HTMLElement | The current chooser option element |
getClosestChooserOption(element) → {HTMLElement|null}
- Description:
Get the closest chooser option element.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
element |
HTMLElement |
Returns:
element
- Type
- HTMLElement | null
getSearchInputElement() → {HTMLElement}
- Description:
Get the search input element.
- Source:
Returns:
The search input element.
- Type
- HTMLElement
hideModuleHelp(internal)
- Description:
Hide the help section of the chooser.
- Source:
Parameters:
Name | Type | Default | Description |
---|---|---|---|
internal |
String | null |
null
|
The internal name of the module to return to, if any. |
initActiveTabNavigation()
- Description:
Initialise the active tab navigation.
- Source:
initBootstrapComponents()
- Description:
Initialise all Boostrap components.
- Source:
isFavoutiteTabActive() → {Boolean}
- Description:
Check if the search tab is active.
- Source:
Returns:
True if the search tab is active, false otherwise.
- Type
- Boolean
(async) refreshFavouritesTabContent(mappedModules)
- Description:
Refresh the favourite content.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
mappedModules |
Array | The modules to be displayed in the favourite tab. |
(async) refreshSearchResults(searchResultsData)
- Description:
Show the search results.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
searchResultsData |
Object | Data containing the module items that satisfy the search criteria |
toggleFavouriteTabDisplay(displayed)
- Description:
Toggle the display of the favourite tab.
The favourite tab is only displayed when there are favourite modules or when it is the active tab.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
displayed |
Boolean | Whether we want to show or hide the favourite tab |
(inner) disableFocusAllChooserOptions(tabNav)
- Description:
Disable the focus of all chooser options in a specific container (section).
- Source:
Parameters:
Name | Type | Description |
---|---|---|
tabNav |
HTMLElement | The tab navigation element (from the shown.bs.ta event). |
(inner) showAllActivitiesTab() → {HTMLElement}
- Description:
Show the "All activities" tab.
- Source:
Returns:
The "All activities" tab element.
- Type
- HTMLElement
(inner) showModuleHelp(moduleData, modal)
- Description:
Given an event from the main module 'page' navigate to it's help section via a carousel.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
moduleData |
Object | Data of the module to carousel to |
modal |
Modal | The modal object |
(inner) updateItemStarredIcons(internal, favourite)
- Description:
Update the starred icons in the chooser modal.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
internal |
String | The internal name of the module. |
favourite |
Boolean | Whether the module is a favourite or not. |