The DeviceTable widget has been implemented with the functionality to insert text messages associated with the icons in the table, which can be viewed by hovering the mouse pointer over them.
To implement this, add an array called "hoverIcons" to the json defined in Configuration properties CKeditor form, where each element contains the text to be displayed, as in the following example:
{
"ordering":"dateObserved", "query":"https://www.snap4city.org/superservicemap/api/v1/iot-search/?selection=43.77;11.2&maxDists=2000.2&model=metrotrafficsensor",
"actions":["pin" ],
"columnsToShow":[
"id", "dateObserved", "avgTime", "concentration"
],
"hoverIcons":["View Details.” ]
}
- The hover messages order is based on the order in which the icons are written in the "actions" parameter and must match it. If you want to leave an icon without a message, you must leave a null element or an empty string.
For example:
"hoverIcons":["Pay permission", "", "Delegate permission"]. In this case, the second icon does not have a message, while the others do.
- If there are fewer elements in "hoverIcons" than in "actions", the last icons will not have a message.
- "hoverIcons" is not a mandatory parameter, and if it is not specified, there are simply no messages to display.
- Since the elements in the Array are separated by double quotes, this character cannot be used in message texts, as it could cause an inconsistency in assigning elements. It is recommended to use "; however, commas and single quotes can be used. Elements in the array not contained within double quotes are considered invalid.
--end--