Methods
changeView(viewBtn)
Update 'view' object values from a encoded base64 string
Parameters:
Name | Type | Description |
---|---|---|
viewBtn |
HTMLElement
|
The HTML button, container of the view data |
displayFromIndex(nodeIds)
Display items from the index list that correspond to the nodes ids
Parameters:
Name | Type | Description |
---|---|---|
nodeIds |
array
|
List of nodes ids |
displayNodes(nodeIds)
Display some nodes & their links, by their id
Parameters:
Name | Type | Description |
---|---|---|
nodeIds |
array
|
List of nodes ids |
filter(isChecked, nodeIdsList, input, fromElt)
Toggle a filter from his checkbox
Parameters:
Name | Type | Default | Description |
---|---|---|---|
isChecked |
bool
|
Checkbox boolean : checked or not | |
nodeIdsList |
string
|
List of nodes id to filter, separeted by comas | |
input |
HTMLElement
|
The filter element from DOM | |
fromElt |
bool
|
false | If function is activeted from a 'onchange' attribute |
getActiveFilterNames() → {array}
Get active filters name
Returns:
- Type:
-
array
- Filter names list
getFilterNames() → {array}
Get all filters name from the page
Returns:
- Type:
-
array
- Filter names list
getNodesHideByFilter() → {array}
Get nodes id hidden by filters into an array
Returns:
- Type:
-
array
- Nodes id list
getUnactiveFilterNames() → {array}
Get unactive filters name
Returns:
- Type:
-
array
- Filter names list
hideFromIndex(nodeIds)
Hide items from the index list that correspond to the nodes ids
Parameters:
Name | Type | Description |
---|---|---|
nodeIds |
array
|
List of nodes ids |
hideNodes(nodeIds)
Hide some nodes & their links, by their id
Parameters:
Name | Type | Description |
---|---|---|
nodeIds |
array
|
List of nodes ids |
nodeFocus(nodeIdsList)
Display some nodes, hide all others
Turn on the 'focusMode'
Parameters:
Name | Type | Description |
---|---|---|
nodeIdsList |
string
|
List of ids from nodes to keep displayed |
openRecord(id, history)
Open the record reading panel & show one
Parameters:
Name | Type | Default | Description |
---|---|---|---|
id |
array
|
Record/node id | |
history |
boolean
|
true | If history must be actualised, true by default |
parseIdsString() → {array}
Get nodes id list (array of numbers) from a string
Returns:
- Type:
-
array
- Ids array
registerView() → {string}
Take 'view' object values & encode them on base64
(no ACSII caracters are allowed)
Returns:
- Type:
-
string
- base64 string
resetFocus()
Display nodes hidden by nodeFocus(),
if their are not filtered
setFilters(filtersNameToActivate)
Activate filters by their name and if their are not already activated
Unactive others filters if their are not already unactivated
Parameters:
Name | Type | Description |
---|---|---|
filtersNameToActivate |
array
|
List of filter names |