HOW TO: Hover messages for DeviceTable icons

×

Warning message

  • You can't delete this newsletter because it has not been sent to all its subscribers.
  • You can't delete this newsletter because it has not been sent to all its subscribers.
  • You can't delete this newsletter because it has not been sent to all its subscribers.

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--

HOW TO: Hover messages for DeviceTable icons | Snap4City

Error

×

Error message

  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Unable to send e-mail. Contact the site administrator if the problem persists.
  • Notice: Trying to get property of non-object in user_is_logged_in() (line 1576 of /var/www/html/drupal/modules/user/user.module).
  • Notice: Trying to get property of non-object in user_is_logged_in() (line 1576 of /var/www/html/drupal/modules/user/user.module).
  • Notice: Trying to get property of non-object in og_field_access() (line 578 of /var/www/html/drupal/sites/default/modules/og/og.module).
  • Notice: Trying to get property of non-object in user_access() (line 806 of /var/www/html/drupal/modules/user/user.module).
  • Notice: Trying to get property of non-object in user_access() (line 818 of /var/www/html/drupal/modules/user/user.module).
  • Notice: Trying to get property of non-object in user_access() (line 819 of /var/www/html/drupal/modules/user/user.module).
  • Notice: Trying to get property of non-object in user_access() (line 825 of /var/www/html/drupal/modules/user/user.module).
  • Notice: Trying to get property of non-object in user_access() (line 828 of /var/www/html/drupal/modules/user/user.module).
  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/drupal/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/drupal/includes/bootstrap.inc).
  • Error: __clone method called on non-object in og_user_access_entity() (line 2249 of /var/www/html/drupal/sites/default/modules/og/og.module).
The website encountered an unexpected error. Please try again later.